Skip to content

Number Systems

Most calculations are done using decimal (base 10) number systems, but hissab also supports other number systems.

Number systemExamples
Decimal
Base: 10. The default number system we all know and love
1234
1,234
23*43
989
Binary
Base: 2. To input as a binary number use prefix 0b or 0B followed by the binary number
0b010101 + 0B101010
0b111111
Octal
Base: 8. To input as a octal number use prefix 0o or 0O followed by the octal number
0O214562 + 0o263546
0o500330
Hexadecimal
Base: 16. To input as a hexadecimal number use prefix 0x or 0X followed by the hexadecimal number
0x1a2f3d2 + 0Xc323ef4
0xdd532c6

Numbers with any number system can be used same way as a decimal number.

0b100101 kilogram to grams
0b1001000010001000 grams

You can also use different number systems in the same expression. In this case the result will be presented using the first number system used in the expression.

0b100101 + 2345
0b100101001110
2345 + 0b100101
2,382

Number system conversion

You can convert a number from one number system to another.

0b100101 to hex
0x25
0b100101 to decimal
37
2345 + 0b100101 to octal
0o4516
234234 to binary
0b111001001011111010