0 से 255 तक की संख्याएँ दर्शा सकता है0x00 से 0xFF तक।<<>> स्पेशल फॉर्म से बनाए जाते हैं।
255 से बड़ा पूर्णांक इस्तेमाल करते हैं, तो सिर्फ अंतिम 8 बिट इस्तेमाल होते हैं, जब तक कि आप :: ऑपरेटर से इस्तेमाल होने वाली यूनिट और/या साइज़ न बताएँ।<>/2 इस्तेमाल किया जा सकता है।<<255>> == <<0xFF>>
# Overflowing bits are truncated
<<256>> == <<0>>
<<256::size(16)>> == <<1, 0>>
<<"Hello">> == <<72, 101, 108, 108, 111>>
नल-बाइट <<0>> का ही दूसरा नाम है।
# This string has a string length of 5, but is made up of 7 bytes
string = "cześć"
String.length(string) != byte_size(string)
# Even emoji strings are encoded binaries
"👍" == <<240, 159, 145, 141>>
# Ignore the first 8 bytes, bind the remaining variable sized binary to `body`
<<_::binary-size(8), body::binary>>
यह स्ट्रिंग के लिए भी किया जा सकता है:
# bind the first 5 bytes to `name`,
# match the string literal " the ",
# bind remaining bytes to `species`
<<name::binary-size(5), " the ", species::binary>> = <<"Frank the Walrus">>
{name, species}
# => {"Frank", "Walrus"}