0011 0010 = 5010 ; so 0110 0100 = 10010
Useful Fact: If the number N
is represented by a bit pattern
X
,
then X0
represents 2N
.
If 00110010
represents 5010 ,
then 001100100
represents 10010.
Often you keep the same number of bits in the shifted pattern like this:
01100100
represents 10010.
This is called "shifting left" by one bit. It is often used in hardware to multiply by two. If you must keep the same number of bits (as is usually true for computer hardware) then make sure that no "1" bits are lost on the left.