Professional Documents
Culture Documents
CSC 311 Digital Computer Design
CSC 311 Digital Computer Design
S. O. ADEFAMOYE
Faculty of Sciences,
Computer Science Department
+234 – 809 – 073 – 1442
+229 – 6856 – 1587
Digital Designs Fundamentals 2
CHAPTER 1
INTRODUCTION TO NUMBERS AND CODES
1.0 Number representation: Computers can only process binary data –
i.e. 1’s and 0’s. If numeric data is to be processed then it cannot be
processed in its usual base10 form, it must be converted into its base2
form – known as binary. There are two ways that can be used to represent
numbers in binary:
‘pure’ binary;
Binary-coded decimal (BCD).
There are also two ‘half-way’ stages that are sometimes used by
programmers because they are easier to understand than a string of 1s
and 0s:
Octal;
Hexadecimal.
1.1 ‘Pure’ binary
Pure binary represents numbers using just two digits (‘0’ and ‘1’) and
columns, which increase by a factor of two.
This is in contrast to our normal number system (denary), which uses ten
digits (0-9) and columns, which increase by a factor of ten.
In denary the number one hundred and ninety seven is represented as:
2. Then, starting from the left, ‘take out’ the values in the column headings
from the number, if possible: 128 cannot be taken out of 107 so that
column contains a ‘0’:
64 can be taken out of 107 so that column contains a ‘1’; this leaves
107 – 64 = 43:
3. Keep repeating the above process until the whole number has been
converted to pure binary:
3
Digital Designs Fundamentals 4
Note that the higher codes are not used in BCD because they do not
represent a denary digit. These are:
4
Digital Designs Fundamentals 5
Converting between octal and binary. The octal number 652 (426 in
denary) is represented in binary as:
If we combine the bits in groups of three and label with the appropriate
column headings…
… we can see that converting from octal to binary converts each digit into
its 3-bit binary equivalent (very similar as converting between denary and
BCD).
Thus the octal equivalent of binary number 10011101 will be:
5
Digital Designs Fundamentals 6
6
Digital Designs Fundamentals 7
= 1CE
1.5.1 Expression
Expressing the denary number 195 as eight-bit binary, BCD, octal and
hexadecimal:
Binary
BCD
Octal
Or
Pure Binary:
Group in threes:
Octal value:
7
Digital Designs Fundamentals 8
Hexadecimal
Or:
Pure Binary:
Group in fours:
Hexadecimal value:
Notes:
Negative numbers will always start with a ‘1’ and positives will start with
a ‘0’;
The range of integers that can be represented using one byte is from –
128 up to + 127.
8
Digital Designs Fundamentals 9
Stage one
Convert the positive form of the number into unsigned binary:
Stage two
Starting at the right hand side, copy each bit, up to and including the first
‘1’:
Stage three
Reverse all the other bits:
= – 128 + 64 + 16 + 4 + 1
= – 43
9
Digital Designs Fundamentals 10
SPOT CHECK
1. Assuming a single byte is used, convert the following numbers into two’s
compliment binary:
(a) – 5 (b) – 10 (c) – 20
2. What is the denary value of 1010 1011 if the binary codes represent:
(a) a two’s compliment number (b) a sign and magnitude number
Note that when you add a ‘carry’ to the next column, it is possible for:
1 + 1 + 1 (the carry) = 3 (‘11’ in binary – this is 1 ‘down’ and ‘carry’ 1)
This is better shown if we add 1010 1110 1100 and 0011 1010 1010:
10
Digital Designs Fundamentals 11
1.8.2 Subtraction
To perform subtraction, the number to be subtracted is converted into its
two’s compliment negative and then added.
12
-12
11
Digital Designs Fundamentals 12
CHAPTER 2
TEXT (CHARACTER) REPRESENTATION
12
Digital Designs Fundamentals 13
EBCDIC
Extended Binary Coded Decimal Interchange Code (EBCDIC) was
developed by IBM for use in their mainframe systems. It has the same
limitation as ASCII in that its 8-bit code can only define 256 different
characters.
13
Digital Designs Fundamentals 14
14
Digital Designs Fundamentals 15
CHAPTER 3
DIGITAL SYSTEMS
3.0 DIGITAL CIRCUIT VERSUS AN ANALOG CIRCUIT
Digital systems operate based on discrete signals or information, where as
an analog system relies on continuous signals or information.
•Digital systems are binary in nature, they have two distinct states as
opposed to the infinite states available in an analog system.
A Digital system accepts discrete inputs and generates discrete outputs,
such as On/Off, High/Low, True/False, or 1/0.
17
Digital Designs Fundamentals 18
Theorem 9 A*A’=0
18
Digital Designs Fundamentals 19
19
Digital Designs Fundamentals 20
NOT y=ā
AND y = a .b
OR y=a+b
NAND y a.b
NOR y a+b
XOR y ab
20
Digital Designs Fundamentals 21
21
Digital Designs Fundamentals 22
3. Place the output result in the truth table and move to the next input
combination.
22
Digital Designs Fundamentals 23
23
Digital Designs Fundamentals 24
24
Digital Designs Fundamentals 25
25
Digital Designs Fundamentals 26
26
Digital Designs Fundamentals 27
27
Digital Designs Fundamentals 28
PRACTICAL CONSIDERATIONS
What gates really look like
Typical High/Low voltages for TTL (Transistor Transistor Logic) and CMOS
(Complementary Metal Oxide Semiconductor) logic
Vsupply fixed for TTL but for CMOS can be approximately 3 - 18 volts
28
Digital Designs Fundamentals 29
29
Digital Designs Fundamentals 30
30
Digital Designs Fundamentals 31
31