Menu

Binary to Denary Conversion

Leading Zeros

Leading zeros are the zeros sitting to the left of the first 1 in a binary pattern. They add nothing to the value, so 00101100 and 101100 mean exactly the same amount. Even so, an 8-bit pattern is normally written out in full with all eight bits, so that every bit keeps its correct place value.

Why the full eight bits are kept

A binary pattern only makes sense when each bit is matched to a place value, and a bit's position is what gives it its worth. Writing to a fixed width of eight holds every bit in its own column and stops bits drifting into the wrong column. A number stored in a computer is held in a fixed number of bits anyway, so those extra zeros at the front are just empty space.

Converting a pattern that starts with zeros

Work through all eight bits in the usual way: line them up under 128, 64, 32, 16, 8, 4, 2 and 1, then add only the place values where a 1 appears. A zero bit contributes 0 × its place value, so each leading zero brings nothing to the total.

1286432168421Denary
0010110032 + 8 + 4 = 44

Keeping the bits in place

Dropping zeros from the left only works when every remaining bit keeps its place relative to the right-hand end. If a bit slides one column to the left it doubles, so treating 00101100 as 01011000 gives 88 rather than 44. Adding zeros is the same: a zero added on the right doubles the value, while one added at the front changes nothing.

Practise this