Introduction To Binary Codes

ADVERTISEMENT

ECE 204 - BINARY NUMBERS AND CODES - INV 11
INTRODUCTION TO BINARY CODES
FALL 2003
A.P. FELZER
To do "well" on this investigation you must not only get the right answers but must also do neat,
complete and concise writeups that make obvious what each problem is, how you're solving the
problem and what your answer is. You also need to include drawings of all circuits as well as
appropriate graphs and tables.
From the last three Investigations we know how to convert numbers from decimal to binary and
back again to decimal. And we know how to use 2's complement arithmetic to add and subtract
positive and negative numbers. The objective of this Investigation is to introduce some other codes
including octal, hex and BCD codes for representing numbers and Gray codes for representing
physical locations.
1. We begin with some review problems
a. Convert 87 to 8-bit binary
b. Convert –87 to 8-bit signed magnitude
c. Convert –87 to a 10 bit 2's complement number
2
2
d. Calculate the following sum of 2's complement numbers: A = 10110
+ 01101
2
2
e. Calculate the following difference of 2's complement numbers: B = 11101
– 00101
2. Binary numbers like the following
10110101100101011
are of course great, but keeping track of them is in general tedious and prone to error. One way
to reduce this problem is to write our binary numbers in hexadecimal (hex) which is base
16. The objective of this and the next problem is to introduce the hex number system with the
following sixteen symbols
Hex
Decimal
0–9
0–9
A
10
B
11
C
12
D
13
E
14
F
15
and place values equal to
3
2
1
0
. . . 16
16
16
16
Memorize these results and then
a. Convert B3
to decimal
16
b. Convert 2D
to decimal
16
c. Convert 2A7
to decimal
16
3. What makes hex numbers so nice is that they're easy to convert back and forth to binary as
illustrated in the following example
1

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 4