Most languages (Ruby included) allow number literals to be written in at least three bases: decimal, octal and hexadecimal. Numbers in decimal base is the usual thing and are wr
For literals, the prefix is 0b. So
0b100 #=> 4
Be aware that the same exists to format strings:
"%b" % 4 #=> "100"