Vous êtes sur la page 1sur 23

CC216 - Computer Engineering Dept.

Digital Logic Design

Design Flow
Lecturer: Dr. Hesham El Zouka
Outline
2009 Dr. Hesham EL Zouka

 Design Flow
 Transistors and Switches
 NMOS

 PMOS

 Number Systems
 Binary System
 Sign and Magnitude System
 2’s Complement System
Behavioral level
RTL
Gate level
Treansistor level
SubSystem

Arith Reg. Mem.


System

CPU

subtr
...

adder
Design Flow

Design
Implementation
2009 Dr. Hesham EL Zouka
Design Flow (continued…)
2009 Dr. Hesham EL Zouka

 When designing a digital system, partitioning of the whole


comes first. While doing so we run into so called sub-
sub-
systems of our main system which are simpler definition-
definition-
wise.
 Considering the figure shown in the latter slide our design
procedure which is normally a Top-
Top-Down procedure, starts
by dividing the digital system needed down to components
we already have and/or if a component that has not yet
been designed is reached, we move lower into the levels of
design until we have all needed parts.
Design Follow (continued…)
2009 Dr. Hesham EL Zouka

 Implementation being the procedure of putting together


smaller parts in order to form what is needed is a Bottom-
Bottom-
Up procedure.
procedure.

 In the process of design, we would have a very hard and


almost impossible job if we were to put together -for all
essential components-
components- their transistors and wire them
together. Hence we consider a few modules with a more
defined application in order to decrease the labor in this
repetitive task.
Design Follow (continued…)
2009 Dr. Hesham EL Zouka

 The first set of modules would be gates, now instead of


having a million transistors we have only 200’
200’000 to
300’’000 gates. Making meaningful structures helps a
300
designer who reached such a package in his/her process
not to go any further.
further.

 A decrease in component variation is seen as we sink


deeper in the design level. We only have 2 types of
transistors, while 30 to 40 types of components can be
recognized.
Design Follow (continued…)
2009 Dr. Hesham EL Zouka

 Even in high levels of design, a designer may need to work


with transistors or gates at some levels of his work. In
comparison with building a house by putting together built
blocks and connecting them with bricks, this can be called
glue logic.
Transistors and Switches
2009 Dr. Hesham EL Zouka

 Transistors can be simply defined as on-


on-off switches.
In the CMOS technology we have 2 main types of
transistors: NMOS and PMOS.
Transistors and Switches (continued…)
2009 Dr. Hesham EL Zouka

 The only thing that concerns us here is whether or not the


transistor conducts at a special instance
 The NMOS type conducts when a ‘1 ‘1’ logic value is fed to it’s
gate input while the same happens for a PMOS type when
a ‘0
‘0’ logic value is fed
 Because of the transistors-
transistors-being our building bricks-
bricks-has 2
states, we will have to be working in base 2.
Number Systems
2009 Dr. Hesham EL Zouka

 Binary
 Sign and Magnitude
 2’s Complement
Binary System
2009 Dr. Hesham EL Zouka

 Weight of each position in the Binary System:


System:
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 Conversion of a binary number to it’s equivalent decimal


number: As shown in the latter slide, each position has a
weight which is multiplied by the 0 or 1 in that position. The
sum of the products is equal to the equivalent decimal
number. Example:
1011))2=1*20+1*21+0*22+1*23=(
(1011 =(11
11))10
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 Conversion of a decimal number to it’s equivalent binary


number: For this conversion, we attempt to subtract each
weight from the left most digit in order to find the decimal
number equivalent in binary. Another procedure for this
conversion is multiple divisions and collecting the
remainders, the first digit resulted is the nearest digit to the
binary point. Example:
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 A decimal number can also consist of an integer and a


fractional part, which sum up to make the whole number.
Example: (29
(29..61
61))10=(?)2

(29)10 = 1*24 + 1*23 + 1*22 + 0*21 + 1*20 =(11101)2


(0.61)10 = 1*2-1 + 0*2-2 + 0*2-3 + 1*2-4 + 1*2-5 + 1*2-6
=(0.100111)2
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 Another way is to use multiplication to find the fractional


part. Example:

 The integer part can be exactly found whereas the fractional


part may not. In such a case we should find three binary
digits to represent each decimal digit to maintain accuracy.
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 In our usage of the binary number system-


system-although
we are benefiting because of it’s relativity to
transistors--some problems such as those seen in
transistors
data transmission can occur. This where the use of
hexadecimal and octal number systems is considered
useful.
 To do conversions from base 2 to base 8(16
16),
), each
3(4) bits in base 2 must be converted into it’s
equivalent in base 8(16
16).
). Example:
Binary System (continued…)
2009 Dr. Hesham EL Zouka

 Binary Arithmetic: Summing numbers in base 2 can be


considered the same as decimal summing (The same rules
apply to summing in base 8 and 16 16).
). The main problems
can occur when doing subtractions. But even in this case
the borrowing is just as it is in decimal numbers. Example:
Sign and Magnitude System
2009 Dr. Hesham EL Zouka

 Our need for negative number is obvious in arithmetic,


because of this need and considering the fact that in base 2
we can use nothing but 0s and 1s for our representations,
we define the left-
left-most digit as the number’s sign digit. The
definition constructs the Sign and Magnitude representation
of numbers. In this representation all digits except the left-
left-
most construct the magnitude of the number, while the left-left-
most digit being 1 shows that the number is negative or
positive otherwise.
Sign and Magnitude System (continued…)
2009 Dr. Hesham EL Zouka

 The main problem remaining in this system and it’s


arithmetic, is that we have to use 2 completely different
algorithms and thus 2 completely different circuits for
addition and subtraction.
2’s Complement System
2009 Dr. Hesham EL Zouka

 With another look at the arithmetic in our decimal number


system:

 We have reached our aim which was finding a new way of


subtraction with the same steps as addition. And we have
done it through eliminating the borrowing procedure.
2’s Complement System (continued…)
2009 Dr. Hesham EL Zouka

 We have actually found a new way to negate 37 and that is


the result of subtracting it from 99 and adding 1 to it.
 The same steps can be applied to the binary number
system:

 This representation for negative numbers is used in the 2’s


Complement System.
2’s Complement System (continued…)
2009 Dr. Hesham EL Zouka

 2’s complementing a number is consisted of complementing


it and then adding 1.
 The same rule as the sign and magnitude representation for
distinguishing positive numbers from negative ones applies
in the 2’s complement system.
 In the 2’s complement system, the positive numbers have
the same form as they have in the sign and magnitude
system.
2’s Complement System (continued…)
2009 Dr. Hesham EL Zouka

 2’s complementing a negative number is performed as


starting from the right-
right-most digit until the first ‘1
‘1’ is reached
and then complementing the rest of the digits.
 Addition Example:

 Subtraction Example:

Vous aimerez peut-être aussi