$P[iw
Period.1__
Activity 2.1.1 Binary Numbers & Conversion
Introduction
Have you ever wondered why we use the base-ten, or decimal, number system? Of course, we have
ten fingers. The decimal number system that works so well for us is completely incompatible with
digital electronics. Digital electronics only understand two states, ON and OFF. This is why digital
erectronics use the base-two, or binary, number system. In order for you to be able to design digital
electronics, you will need to be proficient at converting numbers between the decimal and binary
number systems.
In this activity you will learn how to convert numbers between the decimal and binary number
systems.
Equipment
• Paper & Pencil
• Calculator (preferable one with a number base conversion feature)
Procedure
1. Complete the following decimal-to-binary number conversions. An example problem is shown
below. If available, use the base conversion feature of your calculator to check your answers.
Example:
19 (10) = _?_(2)
Solution:
9
2;19 r = 1 (- LSB (Least Significan t Bit)
4
2)9 r=1
2
2;4 r=O
1
2)2 r=O
0
2)1 r = 1 (- MSB (Most Significan t Bit)
Answer:
19 (10) = 10011 (2)
Page 1 of 4
a) 17 (10) = \uoo \ (2) e) 119 (10) = \\\ 0 \\ \ (2)
b) 34 (10) = \'C!OO\C'>
(2) f) 178 (10) = \Otltl O\~ (2)
c) 58 (10) = \\ \ll\0
(2) g) 297 (10) = ,00\0\00\ (2)
d) 92 (10) = \ o\\\c>c (2) h) 413 (10) = \\ t,O\I\O\ (2)
2· Complete the following binary-to-decimal number conversions. An example problem is shown
below. If available, use the base conversion feature of your calculator to check your answers.
Example:
101001 (2) = _]__ {10)
Solution:
1 0 1 0 0 1
2s 24 23 22 21 20
32 16 8 4 2 1
} ~ Bit Weighting
1-
(j
32 + 0 + 8 + 0 + 0 I
+ 1 = 4110
Answer:
101001 (2) = 41 (10)
a) 1100 (2) = \l (10)
e) 10000101 (2) =
b) 1101012) \3"~ (10)
= 1, (10)
f)
c) 111001 (2) 10011001 (2) = \53
= '57 (10)
(10)
g)
d) 1010011 (2) = q~ 100100001 (2) = 2'l(q (10)
- (10)
h)
111101010 (2) = "\<\O (10)
t Perform the remaining decimal-to-binary conversions to complete the table shown below.
Decimal Binary Number
Number
' I
MSB ! ! LSB
O= 0 0 0
1=
2=
G
0
0
\
'
tJ
3= 0 \ \
4= \ 0 0
5= 1 0 1
6= \ \ a
\
7=
' \.
Conclusion
1. The decimal number system has served humans well since the beginning of
mankind. Ug the caveman didn't call it the decimal number system, but he
undoubtedly used his fingers to count objects in his world. If the decimal
system is so good, why do computer and other digital electronic devices
use the binary number system?
(oM-\)-'-\M ([Link],~ Oli;-\,_._\ <2\cc\\ (°"':'-- ' I
°':',ILj"\¼,• I• (t..vv ¢h ' ~
' ' '
:r f,y,,, ~i
0~\-(A -\v., .;1..,)\.- OV\ V..V'-.~ Q~i? c-1
1
.\ u-'1\1' 0 I
2. Now that we are using a number system other the decimal, it is important to properly subscript
our numbers (i.e., 3510, 23410, 100102, etc.). Why is this so important? Provide at least three
examples where neglecting to subscript numbers could lead to confusion.
~ -l l \.l \W\\'Jb'liuY\\ V)('(t\v\~ B-i~ \.\\u.\ ) '1Q ~W\tl\;•l ow eit« I i e,,,L, ,:h..i._,
CVl,~ ~~ -c)·,-~ ~ M-<'"·v,~w),
\:'<'CA.~~<>: 'Swiv1.<. ) ~~/\·-(.~,,.\.) \:i. -6\/\{ ~~lrcd C,"'-~ .-.v•f ( \:,\ \ \,J q tl t tt\t..,) i1 5
3. Without performing the binary-to-decimal conversions, which of the following two binary
numbers is the larger number: (circle one)
~)
.1
• 011010 (2)
4. How were you able to determine th is?
11 ' 'i M~'T) ·, \ (A (5'v\ f' ,C\1/\j 1\. f ./),\t.~, O,NI (1\!\'\ 'S• ;-r h.(,{\
-\'v\~ ,\,v~}t~ vf.\\....-t.
5. Perform the binary-to-decimal conversions and check your answer.
•\ Q\\01 Q \\ ll \ 0
l .\- a.\--l\-\' '6 -+ 0-\'~1-::.. 1\ 5 a .\ 2-1 o-\ ,Z .\ U,: l b
6. Examine the table that you completed in the procedure portion of the activity.
What do you notice about the LSB (least-significant-bit)?
~t:... \.5C) c.. . \\ 4¥\.,'-\ e} ½e\ v-vC',::lf'\ 0 (~.• •,:' rJ c. r, d'('., ~» u\ \,1..,, , J 1-t. ,
1
What do you notice about the middle bit?
~ t'.. ""J~ c,\\ ('_,- \,'-\,~ q \.,1., \_,.'lG"' I) c.v·. J ~! ~ '.( J / h<, ! ... ,, , } 'I' .. (", bf. '.I,
\o: I\
What do you notice about the MSB (most-significant-bit)?
'\/\c: \"\ <; ~ c\ \ ~c,\N.\~~ 1 "7t\.._.",l.(..V'i o ......,,.) II
'"
f " , .,,..l ( \
)
{)•n : ..~i,,.ll 1-, ..v.,.Jh,,..
What pattern do you observe here?
t(.A,""' \, ,-\ a. \t ~-1v1c.z\'(, ½ i:.~.,..('. t:; Dr~, · >(\ c·n ,,J',.,..,6
-\ c ,~-\' ~ ~~ L v<A\vt .
7. Based on your observations above, complete the table shown below.
I
Decimal Binary Number
Number
MSB
i
I
I
I
LSB
0 = 0 0 0 I 0
1 = 0 ! 0 0 l 1
2 = 0 l 0 1 0
I l
3 = 0 ! 0 1 ! 1
4 = 0 I 1 I 0 j 0
I
5 = 0 ! 1 I 0 I' 1
6 = 0 i 1 1 1 I 0
7 = 0 1 ! 1 1
I /
v I
8 =
9 = '\ 0 I
0
0 I
0
\
10 = \ 0 I 0
11 = 0 I \ ' !
I
\
''
I
12 = I :> 0
13 = \ ' \ I
I
D
I
/ \
\ \
14= I \ ! 0
I
15 = \ \
I
I I I
--
I
°'·
':) ~ ~ 1 :. 1- Y' ~ iC\ ~ "L-; l\l\ < ~ \I.\~ : 2 :. 7 °' ,{" 0 -Z,<)(:, ~ 2 -:: \ 0 ~ ,r 0
r