Chapter 1 Introduction
Chapter 1 Introduction
Chapter 1 Introduction
University of Gondar
Institute of Technology
Department of Electrical Engineering
Digital Logic Design:
Chapter 1: Introduction to Digital Systems
By:
Habtamu Maru
Outline
3 Comparison chart
quantity
Habtamu M. Digital Logic Design February 27, 2023 4 / 61
Digital Logic Design
Introduction to Digital and analogue Systems
Digital Representations:
In digital representation the quantities are represented not by continu-
ously variable indicators but by symbols called digits.
Digital information assume a limited (finite) set of ”Discrete” (step by step)
values.
Values change suddenly (not smoothly) by ”Jumping” between values.
Examples:
I Energy levels of electrons in atoms.
I Digital clock
As an example, consider the digital clock, which provides the time of day
in the form of decimal digits that represent hours , minutes and seconds.
As we know, the time of day changes continuously, but the digital clock
reading does not change continuously; rather, it changes in steps of one
per minute or per second.
Habtamu M. Digital Logic Design February 27, 2023 6 / 61
Digital Logic Design
Advantages and Limitations of Digital Techniques
Advantages of Digital system
There are really very few drawbacks when using digital techniques.
The two biggest problems are:
I The real world is analog.
I Processing digitized signals takes time.
The need for conversion between analog and digital (ADC and
DAC) forms of information can be considered a drawback because
of the added complexity and expense.
Another factor that is often important is the extra time required
to perform these conversions.
In many applications, these factors are outweighed by the numer-
ous advantages of using digital techniques, and so the conversion
between analog and digital quantities has become quite common
place in the current technology.
Analog Digital
Basic: It is a continuous wave Basic: It is a discrete wave
that changes over a time pe- that carries information in bi-
riod. nary form.
Signal: Analog signal is a Signal: Digital signals are dis-
continuous which represents crete time signals generated
physical measurements. by digital modulation.
Representation: Uses con- Representation: Uses dis-
tinuous range of values to crete values to represent
represent information & de- information & denoted by
noted by sine waves. square waves.
Range: It has no fixed range.
Range: It has finite № (0 & 1).
Habtamu M. Digital Logic Design February 27, 2023 11 / 61
Digital Logic Design
Comparison chart
Binary digit
Each of the two digit in binary system, 1 & 0 is called a bit, which
is the contraction of the word binary digit.
In digital circuit ,two different voltage level are used to represent
the two bits.
Generally 1 is represented by the higher voltage, which we will
refers as to HIGH and 0 is represented by the lower voltage level
,which we will refers to as a LOW.
This is called positive logic HIGH = 1 & LOW = 0
In another system 1 is represented by LOW and 0 is represented
by HIGH, this system is called negative logic.
Logic level
The voltage used to represent 0 and 1 are called logic level, ide-
ally one voltage level represents a high and another voltage level
represents low.
In practical HIGH can be any voltage between the specified max-
imum value and the specified minimum value. likewise LOW can
be any voltage between the specified maximum value and the
specified minimum value.
There can be no overlap between the accepted HIGH level and the
accepted LOW level.
tw Figure: D=50%
D= ∗ 100%
T
T = T1 = T2 = T3 = ...Tn (1)
1
F=
T
Figure: D=75%
Timing Diagrams:
A timing diagram is a graph of digital waveforms showing the ac-
tual time relationship of two or more waveforms and how each
waveform changes in relation to the others.
Habtamu M. Digital Logic Design February 27, 2023 19 / 61
Digital Logic Design
Binary digit, Logic level & Digital wave form
Data transfer:
Data refers to groups of bits that convey some type of informa-
tion.
In computer systems, as illustrated in Figure below, binary data
are transferred in two ways: serial and parallel.
(1) Serial transfer
sent one bit at a time along a single conductor.
Introduction
A number system is a system of writing for expressing numbers.
It provides a unique representation to every number & represents
the arithmetic & algebraic structure of the figures. It also allows
us to operate arithmetic operations like addition, subtraction..
The decimal system is important because it is universally used to
represent quantities outside a digital system.
For example, calculator (computer), the circuitry inside the ma-
chine converts the decimal number to a binary value.
When we type any letter or word, the computer translates them
into numbers since computers can understand only numbers. A
computer can understand only a few symbols called digits, and
these symbols describe different values depending on the posi-
tion they hold in the number.
Habtamu M. Digital Logic Design February 27, 2023 23 / 61
Digital Logic Design
Number system ,operations and codes
Types of numbering system
Decimal Counting:
When counting in decimal system, we start with 0 in the unit’s po-
sition and take each digit in progression until we reach 9.
Then we add a 1 to the next higher position and start over with
zero in the first position. This process continues until the count of
99 is reached.
The same pattern is followed continuously as high as we wish to
count.
It is important to note that in decimal counting
I The units position (LSD) changes up ward with each step in the
count.
I The tens position changes up ward every 10 steps in the count.
I The hundreds position changes upward every 100 steps in the
count and so on.
Habtamu M. Digital Logic Design February 27, 2023 25 / 61
Digital Logic Design
Number system ,operations and codes
Types of numbering system
Binary Counting:
Let us use 4 bit binary numbers to illustrate the method for count-
ing in binary. The sequence (shown on the right side) begins with
all bits at 0, this is called the Zero count.
For each successive count the units (20 ) position toggles; that is, it
changes from one binary value to the other. Each time the units
bits changes from a 1 to 0, the twos (21 ) position will toggle (change
states).
Each time the twos position changes from 1 to 0, the fours (22 )position
will toggle (change states).
Like wise, each time the four bits/ position goes from 1to 0, the
eights (23 ) position toggles. As we have seen in the table below.
In general, with “n” bits we can count up to a number equal to 2n -1
Habtamu M. Digital Logic Design February 27, 2023 27 / 61
Digital Logic Design
Number system ,operations and codes
Types of numbering system
Octal Counting:
1) Binary-to-decimal Conversions:
Any binary number can be converted to its decimal equivalent
simply by summing together the weights of the various positions
in the binary number, which contain a 1 and discarding the weights
of all bits that are 0.
Fore example:
Note that the MSB has a weight of 27 even though it is the 8th bit
this is because the LSB is the first bit and has a weight of 20 .
Habtamu M. Digital Logic Design February 27, 2023 35 / 61
Digital Logic Design
Number system ,operations and codes
Conversion of one Number System to Another
9) Hex-to-Binary conversion:
The Hexadecimal number system is used primarily as a ”Short-
hand” method for representing binary numbers.
Each hex digit is converted to its 4 bit binary equivalent.
10) Binary-to- Hex conversion:
The binary number is grouped into groups of four bits, and each
group is converted to its equivalent hex digit.
Zeros (shown shaded) are added, as needed, to complete a four-
bit group.
Habtamu M. Digital Logic Design February 27, 2023 41 / 61
Digital Logic Design
Number system ,operations and codes
Conversion of one Number System to Another
Summary of Conversions
When converting from binary [or octal, or hex] to decimal, use
the method of taking the weight sum of each digit position.
When converting from decimal to binary [or octal or hex] use the
method of repeatedly dividing by 2 [or 8 or 16] and collecting
remainders.
When converting from binary to octal [or hex], group the bits in
groups of the three [or four], and convert each group into the
correct octal [or hex] digit.
From Hexadecimal or Octal to Binary Change each symbol to
binary and you are done!
Binary Arithmetic
Binary arithmetic is essential in all digital computers and in any
other digital systems.
To understand digital system we must know the basics of binary
addition,subtraction, multiplication, and division
four basic rules for binary addi- four basic rules for binary sub-
tion traction
Binary multiplication
The multiplication of binary numbers is done in the same manner as the
multiplication of decimal numbers.
Binary division
The process for dividing one binary number (the dividend) by another
(the divisor) is the same as that followed for decimal numbers, that which
we usually refer to as long division.
The actual process is simpler in binary because when we are checking to
see how many times the divisor “goes into” the dividend, there are only
two possibilities, 0 or 1.
1’s-Complement Form
The 1’s complement of a binary number is obtained by changing
each 0 to a 1 and each 1 to a 0.
2’s Complement Form
The 2’s complement of a binary number is formed by taking the 1’s
complement of the number and adding 1 to the least-significant-
bit position.
Binary Codes
In the coding, when numbers, letters or words are represented
by a specific group of symbols, it is said that the number, letter or
word is being encoded.
The group of symbols is called as a code. The digital data is repre-
sented, stored and transmitted as group of binary bits. This group
is also called as binary code.
When a decimal number is represented by its equivalent binary
number, we call it straight binary coding.
We have seen that the conversing between decimal and binary
can be come long and complicated for large numbers.
For this reason, a means of encoding decimal numbers that com-
bines some features of both the decimal and binary system is
used in certain situations.
Habtamu M. Digital Logic Design February 27, 2023 49 / 61
Digital Logic Design
Number system ,operations and codes
Conversion of one Number System to Another
I Weighted Codes
I Non-Weighted Codes
I Binary Coded Decimal Code
I Alphanumeric Codes
I Error Detecting Codes
I Error Correcting Codes
Weighted Codes:
Weighted binary codes are those binary codes which obey the po-
sitional weight principle. Each position of the number represents
a specific weight. Several systems of the codes are used to ex-
press the decimal digits 0 through 9. In these codes each decimal
digit is represented by a group of four bits.
Gray code :
It is the non-weighted code and it is not arithmetic codes i.e. there
are no specific weights assigned to the bit position.
The Gray code belongs to a class of codes called minimum change
codes, The unique aspect of the Gray code is that only one bit ever
changes between two successive numbers in the sequence.
Because of this, the gray code is not suitable for arithmetic op-
erations but finds application in input/out put devices and some
types of analog-to digital converters.
The most common application of the Gray code is in shaft position
encoders. A shaft position encoder produces a code word which
represents the angular position of the shaft
Going from left to right , add Add each binary code bit gener-
each adjacent pair of binary code ated to the gray code bit in the
bits to get the next gray code bit. next adjacent position. Discard
Discard carries. carries.
Excess-3 code:
The Excess-3 code is also called as XS-3 code. It is non-weighted
code used to express decimal numbers.
The Excess-3 code words are derived from the 8421 BCD code
words adding (0011)2 or (3)10 to each code word in 8421.
To encode a decimal number to the excess –3 form, we add 3 to
each digit of the decimal number and convert to binary form.
Note that both BCD and Excess-3 use only 10 of the 16 possible 4
bit code groups.
The Excess-3 code, however, does not use the same code groups.
For Excess-3 code, the invalid code groups are 0000, 0001, 0010,
1101,1110, and 1111
Habtamu M. Digital Logic Design February 27, 2023 56 / 61
Digital Logic Design
Number system ,operations and codes
Conversion of one Number System to Another
Alphanumeric Codes
A binary digit or bit can represent only two symbols as it has only
two states ’0’ or ’1’. But this is not enough for communication be-
tween two computers because there we need many more sym-
bols for communication.
Computer should recognize “codes” that represent letters of the
alphabet, punctuation marks, and other special characters as well
as numbers. These codes are called ”alphanumeric codes”.
A complete alphanumeric code would include:
I The 26 upper and lower case letters;
I 10 numeric digits,
I 7 punctuation marks, and
I Anywhere from 20 to 40 other characters, such as +, /, #, %,*, and
so on
Habtamu M. Digital Logic Design February 27, 2023 58 / 61
Digital Logic Design
Number system ,operations and codes
Conversion of one Number System to Another
!! !
O U
K Y
A N
T H
Habtamu M. Digital Logic Design February 27, 2023 61 / 61