Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Binary Literals

< >
Example from 1 languages: JavaScript
// 0[bB][01]+n? 0b100110100000110011110010010
Example from 1 languages: Python
# 0[bB](?:_?[01])+
Example from 2 languages: Java, AspectJ
// 0[bB][01][01_]*[lL]?
Example from 1 languages: Perl
# 0b[01]+(_[01]+)*
Example from 1 languages: Swift
// 0b[01_]+
Example from 1 languages: Haskell
-- 0[bB]_*[01](_*[01])*
Example from 1 languages: Elixir
# 0b[01]+
Example from 1 languages: Prolog
% 0b[01]+
Example from 1 languages: Julia
# 0b[01]+((_[01]+)+)?
Example from 1 languages: MySQL
-- b'[01]+'
Example from 3 languages: Reason, Croc, MiniD
// 0[bB][01][01_]*
Example from 1 languages: D
// 0[Bb][01_]+
Example from 1 languages: Chapel
// 0[bB][01]+
Example from 1 languages: F#
// 0[bB][01][01_]*[uU]?[yslLn]?
Example from 1 languages: VHDL
-- B"[01_]+"
Example from 1 languages: Verilog
// ([0-9]+)|(\'b)[01]+
Example from 1 languages: C3
0b110011
Example from 1 languages: Eiffel
-- 0[bB][01]+
Example from 1 languages: Ceylon
// \$([01]{4})(_[01]{4})+
Example from 1 languages: SystemVerilog
// ([1-9][_0-9]*)?\s*\'[sS]?[bB]\s*[xXzZ?01][_xXzZ?01]*
Example from 1 languages: K
/ [01]+b
Example from 1 languages: Felix
// 0[Bb][01_]+([tTsSiIlLvV]|ll|LL|([iIuU])(8|16|32|64))?
Example from 1 languages: Whiley
// [01]+b
Example from 1 languages: Monkey
' \%[10]+
Example from 1 languages: Jule
0b0001010101
Example from 1 languages: Speedie
|| num = 0b010101
Example from 1 languages: Aardvark
`2_101` would evaluate as a binary number.
Example from 1 languages: Crap
// The same as c
*

Languages with Binary Literals include JavaScript, Python, Java, Perl, Swift, Haskell, Elixir, Prolog, Julia, Zig, MySQL, Reason, D, Chapel, F#, Coq, OCaml, VHDL, F*, Verilog, C3, Eiffel, Opa, Futhark, Ceylon, SystemVerilog, NumPy, K, Felix, AspectJ, ooc, Isabelle, Logtalk, BlitzMax, Whiley, Monkey, Earl Grey, BlitzBasic, Croc, Jule, FloScript, MiniD, Savi, Speedie, Aardvark, parasail, Crap, nimrod, CBOR data definition language

*

Languages without Binary Literals include progsbase

*

View all concepts with or missing a hasBinaryNumbers measurement

*

Read more about Binary Literals on the web: 1.

- Build the next great programming language Add Issues About Search Keywords Livestreams Labs Resources Acknowledgements