You are on page 1of 31

Digital Logic Design

Introduction
What Is It
Design Combinational Circuits (ones with
just AND, OR, NOR etc gates)
Design Sequential Circuits (ones with
memory)
Optimize the design
Use HDL
Topics in the Course
Numbers Systems and Digital
Representation
Boolean Algebra
Gate Level Optimization
Combinational Logic
Topics in the Course
Synchronous Sequential Logic
Registers, Counters etc
Memory and Programmable Logic
Register Transfer Level
Integrated Circuits
What is Digital
Signals represented by discrete values
Practically always binary
Analog signals are approximated (A/D
conversion)
Almost everything is digital nowadays.
Why Digital
Digital circuits are inexpensive
Easy to reduce noise
Great flexibility in the design.
Why Logic
The tools we use are borrowed from
Mathematical Logic
Design
Digital systems can be very big
With size comes complexity
We have to maintain order
We have to optimize
How
Keep things modular
Have a hierarchy of design levels
Digital design is just one level
Electronic design is the level below
Architectural Design is the level above
Design Issues
Cost, Speed, Size, Power
Design always involves compromise
Medium size: it is science
Large size: it is art
Huge size: it is politics!
CAD Tools
Digital Systems too complex to design by
hand. Schematics would be the size of
football fields.
Tools allow us to use many different
technologies
Tools provide simulators
Hardware Implementation
Integrated Circuits (IC)
Monolithic
Millions of transistors
Many standard ICs
Microprocessors/Microcontrolers
ASICs
FPGAs
Digital Representation
Number Systems
Symbolic representation (ASCII, Unicode)
Number Systems
Unsigned integers (binary, Gray code)
Signed integers (1s , 2s complement, etc)
Floating point numbers
Radix Complement
Consider a system that handles only 2 digit
decimal numbers (like 12, 68, 95)
In this system 99+1=00, and x+100=x, if x is
a 2 digit decimal (extra bits or digits are
discarded).
Also (x-y)+100=x-y.
So....
Since x-y=(x-y)+100
x-y=x+(100-y)=x+y
We can subtract by adding the complement
Consider 1-49 to be positive numbers
Consider 50-99 to be negative numbers
For Example

32-1=32+(100-1)=32+99=131=31

25-49=25+(100-49)=25+51=76=-(100-76)=-24

How about

48+3=51=-(100-51)=-49
It is called overflow
Since we have the negative numbers
occupying half our space, we get overflow
with half as small numbers.
When the sum of two positives (or zero) is
negative we have overflow.
When the sum of 2 negatives (or zero) is
positive...
Computing the Complement
The radix complement involves a subtraction
The reduced radix complement involves a
very easy subtraction (no carry, no borrow)
Eg 99-23=76
Use reduce radix complement and add 1
Eg 100-23=99-23+1=76+1=77
So What!
Adding the 1 needs an incrementer (almost
as expensive as an adder), doesnt it?
Not if we are following this with an addition
We can give the 1 as a carry-in in the LSB full
adder.
For Example

32-31=32+(100-31)=32+(99-31)+1=32+68+1=101=1

Adding a positive and a negative is always safe.

-25-25=100-25+100-25=150=50=-? Huh
Binary addition
Binary 1s complement is even easier
It is the (boolean) complement
It is easy to check if a number is negative
The first bit is the sign bit (1 means negative)
Eg 00101-00011=00101+(100000-00011)=
00101+11101=100010=00010
Converting
Successive divisions
Convenient for going from decimal to other
systems
Polynomial evaluation
Convenient for going from other systems to
decimal
Example
Convert decimal 25 to octal
25 8 = 3 (1)
3 8 = 0 (3)
Answer: 31
Convert octal 31 to decimal
3*8^1 + 1*8^0 = 25
Moral of the story
OCT 31 = DEC 25

You might also like