40 in Binary
40 in binary is 10 1000 (101000).
Result 101000.
Binary (base 2)10 1000
Step by step
- Divide by 2 repeatedly and write down the remainders:
Division Quotient Remainder 40 ÷ 2 20 0 20 ÷ 2 10 0 10 ÷ 2 5 0 5 ÷ 2 2 1 2 ÷ 2 1 0 1 ÷ 2 0 1 - Read the remainders from bottom to top: 10 1000
| binary (base 2) | 10 1000 |
|---|---|
| octal (base 8) | 50 |
| decimal (base 10) | 40 |
| hexadecimal (base 16) | 28 |
| Bits needed | 6 bits (fits in 1 byte) |
| 8-bit form | 0010 1000 |
| 16-bit form | 0000 0000 0010 1000 |
| 32-bit form | 0000 0000 0000 0000 0000 0000 0010 1000 |
Quick method for 40
Find the powers of 2 that add up to 40: 32 + 8. Put a 1 in those places and 0 elsewhere: 101000.
40 in other forms
- Place values: 32 + 8 = 40
- Hex: 28
- Octal: 50
- 6 bits — fits in one byte
- 2 one-bits (even parity)
- Padded: 0010 1000
- 16-bit: 0000 0000 0010 1000
- One's complement (8-bit): 1101 0111
- Between 25 = 32 and 26 = 64
- −40 in 8-bit two's complement: 1101 1000
- ASCII: “(” — ASCII table
Going back: binary to decimal.
More numbers in binary
40 in binary: questions
What is 40 in binary?
101000.
What is 40 in hex?
28.
How many bits is 40?
6.