1101 1010₂ → hex and octal — number base conversion
coregrouping by 4 and by 3 bits
Answer
DA₁₆ = 332₈
Why this example is worth doing
The shortcut that makes hex worth knowing: because sixteen is two to the fourth, each hex digit is exactly four bits and conversion is pure grouping with no arithmetic at all. Octal groups by three for the same reason. The page shows the grouping from the right-hand end and warns about the one real pitfall — padding the leftmost group with leading zeros rather than trailing ones, which silently multiplies the value.
Try your own input in the Binary ⇄ decimal ⇄ hex ⇄ octal. Convert between any two bases, integers and fractions, with the positional working.
How the answer is reached
Base 2 to base 16
Convert 11011010 from base 2 to base 16. The sign is carried across unchanged; only the magnitude is converted.
| digit | value | weight | weight (base 10) | digit x weight |
|---|---|---|---|---|
| 1 | 1 | 2^7 | 128 | 128 |
| 1 | 1 | 2^6 | 64 | 64 |
| 0 | 0 | 2^5 | 32 | 0 |
| 1 | 1 | 2^4 | 16 | 16 |
| 1 | 1 | 2^3 | 8 | 8 |
| 0 | 0 | 2^2 | 4 | 0 |
| 1 | 1 | 2^1 | 2 | 2 |
| 0 | 0 | 2^0 | 1 | 0 |
| total | 218 |
Integer part: divide by 16 and read the remainders bottom to top.
| n | divide by | quotient | remainder |
|---|---|---|---|
| 218 | 218 ÷ 16 | 13 | A |
| 13 | 13 ÷ 16 | 0 | D |
| side | groups of 4 | base 16 |
|---|---|---|
| integer side (pad left) | 1101 1010 | DA |
11011010 (base 2)DA (base 16)
Base 2 to base 8
Convert 11011010 from base 2 to base 8. The sign is carried across unchanged; only the magnitude is converted.
| digit | value | weight | weight (base 10) | digit x weight |
|---|---|---|---|---|
| 1 | 1 | 2^7 | 128 | 128 |
| 1 | 1 | 2^6 | 64 | 64 |
| 0 | 0 | 2^5 | 32 | 0 |
| 1 | 1 | 2^4 | 16 | 16 |
| 1 | 1 | 2^3 | 8 | 8 |
| 0 | 0 | 2^2 | 4 | 0 |
| 1 | 1 | 2^1 | 2 | 2 |
| 0 | 0 | 2^0 | 1 | 0 |
| total | 218 |
Integer part: divide by 8 and read the remainders bottom to top.
| n | divide by | quotient | remainder |
|---|---|---|---|
| 218 | 218 ÷ 8 | 27 | 2 |
| 27 | 27 ÷ 8 | 3 | 3 |
| 3 | 3 ÷ 8 | 0 | 3 |
| side | groups of 3 | base 8 |
|---|---|---|
| integer side (pad left) | 011 011 010 | 332 |
11011010 (base 2)332 (base 8)