cpsc 121 Worksheet on

advertisement
cpsc 121
(or base
Worksheet on
binary, octal, decimal, and hexadecimal
2,
8,
10,
and
16)
Base
Digits
2
0,1
0,1,2,3,4,5,6,7
8
0,1,2,3,4,5,6,7,8,9
10
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
16
Example
decimal equivalent
1011
1*8+0*4+1*2+1*1=11
362
3*64+6*8+2=242
2973
2*1000+9*100+7*10+3
C6A
12*16*16+6*16+10
note: * means multiplication
Homework Due Friday, 9/11/09 at class time - SHOW your
work!
1) Convert the binary number 1011100 to
a) decimal
b) octal
(hint: group by 3's starting at the right)
c) hexadecimal (hint: group by 4's starting at the right)
2) Convert the binary number 110011110 to
a) decimal
b) octal
c) hexadecimal
3) Convert octal number 347 to
a) decimal
b) binary
(hint: write each digit as a 3-digit binary)
c) hexadecimal
4) Convert decimal 28 to binary
5) Convert decimal 6.25 to binary
6) What representation system do most computer systems use
to store both positive and negative numbers?
Why?
Download