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