# Bitstring and binary

**URL:** <https://forum.elixirforum.com/t/bitstring-and-binary/2351>\
**Category:** Questions\
**Created:** [November 12, 2016, 1:57pm UTC](https://forum.elixirforum.com/t/bitstring-and-binary/2351 "2016-11-12T13:57:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nathanl](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nathanl/32/39891_2.png) [@nathanl](https://forum.elixirforum.com/u/nathanl)\
**Post date:** [November 14, 2016, 1:30pm UTC](https://forum.elixirforum.com/t/bitstring-and-binary/2351/4 "2016-11-14T13:30:26Z")

</div>

Thanks @jaysoifer! I also wrote some blog posts covering some of the talk topics in a little more depth:

- [Elixir and Unicode, Part 1: Unicode and UTF-8 Explained](https://www.bignerdranch.com/blog/unicode-and-utf-8-explained/)
- [Elixir and Unicode, Part 2: Working with Unicode Strings](https://www.bignerdranch.com/blog/elixir-and-unicode-part-2-working-with-unicode-strings/)
- [Elixir and IO Lists, Part 1: Building Output Efficiently](https://www.bignerdranch.com/blog/elixir-and-io-lists-part-1-building-output-efficiently/)
- [Elixir and IO Lists, Part 2: IO Lists in Phoenix](https://www.bignerdranch.com/blog/elixir-and-io-lists-part-2-io-lists-in-phoenix/)

@kostonstyle The way I phrased this distinction was:

> In Elixir, a “bitstring” is anything between \<\< and \>\> markers, and it contains a contiguous series of bits in memory. If there happen to be 8 of those bits, or 16, or any other number divisible by 8, we call that bitstring a “binary” - a series of bytes. And if those bytes are valid UTF-8, we call that binary a “string”.

So a subset of bitstrings are binaries, and a subset of binaries are strings. Like this:

 ![](https://forum.elixirforum.com/uploads/default/original/2X/3/3d7b156a03a8df870bd0f481465dcbc5d326b0c1.png)

If you don’t understand what it means for something to be “UTF-8 encoded”, the first blog post should help.

---

_[View the full topic](https://forum.elixirforum.com/t/bitstring-and-binary/2351)._
