Binary literal



Binary literal
Pas2JS pascal source code
var i: Integer; BEGIN Writeln(0b0); // 0 Writeln(0B1); // 1 Writeln(0b10); // 2 Writeln(0xa); // 10 i := 0b1110; Writeln(i and 0b11); // 2 Writeln(0b0111 and i); // 6 Writeln(0b0111 and 0x4); // 4 Writeln(0b_101_111); // 45 Writeln(0b101_101); // 47