Try to be

Elixir Pro — Mastering Binaries & Bit Data :)

Just play with strings & fine tune them.

Malreddy Ankanna
blackode
Published in
8 min readMay 26, 2018

--

This article comprises how strings, binaries and bit data vary from each other. It also gives you the idea on Strings and Raw bytes explaining with realtime examples. I designed the images used in this article to get clear focus on binaries. Hope you like them.

Elixir Version

All the examples used in this article are executed in iex using the following combination of Elixir/Erlang OTP .

Elixir version

Gentle Intro

I got to do the heavy workout on packet parsing using the header lengths on raw binaries decoding and encoding of 16, 32, 64 bit strings in one of my projects. So, I just got a thought to share the experience.

Hope, you already knew the difference of bitstring, binary, bit, and byte. If true, do: skip the following screen shot else: have a glance of it.

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode