0% found this document useful (0 votes)
10 views28 pages

DLD CH1

Uploaded by

K.nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views28 pages

DLD CH1

Uploaded by

K.nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

WALLAGA UNIVERSITY

COLLEGE OG ENGINEERINMG AND TECHNOLOGY


DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Course: Digital Logic Design

By: Terefe Bayisa (MSc.)


Chapter 1

IntroduCtIon to dIgItal ConCepts

Electronic circuits can be divided into two broad categories,


a) Digital and
b) Analog.

Digital: electronics involves quantities with discrete values, and analog electronics involves quantities with
continuous values.

Analog: quantities is one having continuous values. A digital quantity is one having a discrete set of
values. Most things that can be measured quantitatively appear in nature in analog form. For example, the
air temperature changes over a continuous range of values
• During a given day, the temperature does not go from, say, 70° to 71 ° instantaneously; it takes on
all the infinite values in between

Suppose, you just take a temperature reading every hour. Now, you have sampled values representing the temperature at
discrete points in time (every hour) over a 24-hour period, as indicated in Fig
The Digital Advantages
Ø Digital data can be processed and transmitted more efficiently and reliably than analog data.
Ø Digital data has a great advantage when storage is necessary.
For example, music when converted to digital form can be stored more compactly and reproduced with greater
accuracy and clarity than is possible when it is an analog form. Noise (unwanted voltage fluctuations) does not affect
digital data nearly as much as it does analog signals.
Ø Digital systems are used in communication, business transaction, traffic control, space guidance, medical treatment,
weather monitoring, the internet, and many other commercial, industrial, and scientific enterprises.

Ø We have digital telephones, digital TV’s, digital versatile discs, digital cameras…
An Analog Electronic System
A pubic address system, used to amplify sound so that it can be heard by a large audience.
Digital / Analog Electronic System

Ø The compact disc (CD) player is an example of a system in which both


Ø digital and analog circuits are used. Music in digital form is stored on the
Ø compact disc. A laser diode optical system picks up the digital data from the
Ø rotating disc and transfers it to the (DAC) digital-to-analog converter. The
Ø output analog signal is amplified and sent to the speaker
Digital Computers and Digital Systems
Ø Digital computers have made possible many scientific, industrial, and commercial advances that
would have been unattainable otherwise. Computers are used in scientific calculations, commercial
and business data processing, air traffic control, space guidance, the educational field, and many
other areas.

Ø The most striking property of a digital computer is its generality. It can follow a sequence of
instructions, called a program that operates on given data. The user can specify and change
programs and/or data according to the specific need. As a result of this flexibility, general-purpose
digital computers can perform a wide variety of information- processing tasks.

Ø The general-purpose digital computer is the best-known example of a digital system. Other
examples include telephone switching exchanges, digital voltmeters, digital counters, electronic
calculators, and digital displays.
Cont…
• Characteristic of a digital system is its manipulation of discrete elements of information: such
discrete elements may be electric impulses, the decimal digits, the letters of an alphabet, arithmetic
operations, punctuation marks, or any other set of meaningful symbols. For example, the letters d,
0, and g form the word dog

• A physical system whose behavior is described by mathematical equations is simulated in a digital


computer by means of numerical methods. When the problem to be processed is inherently discrete,
as in commercial applications, the digital computer manipulates the variables in their natural form.
A block diagram of the digital computer is shown in Fig.
Cont….
• The input and output devices are special digital systems driven by electromechanical parts and
controlled by electronic digital circuits. An electronic calculator is a digital system similar to a digital
computer, with the input device being a keyboard and the output device a numerical display.
Instructions are entered in the calculator by means of the function keys, such as plus and minus.

• Data are entered through the numeric keys. Results are displayed directly in numeric form. Some
calculators come close to resembling a digital computer by having printing capabilities and
programmable facilities. A digital computer, however, is a more powerful device than a calculator.

• A digital computer can accommodate many other input and output devices; it can perform not only
arithmetic computations, but logical operations as well and can be programmed to make decisions based
on internal and external conditions.
Cont….
• Discrete elements of information are represented in a digital system by physical quantities called signals.
Electrical signals such as voltages and currents are the most common. The signals in all present-day
electronic digital systems have only two discrete values and are said to be binary.

• The memory unit stores programs as well as input, output, and intermediate data. The processor unit
performs arithmetic and other data-processing tasks as specified by a program. The control unit
supervises the flow of information between the various units. The control unit retrieves the instructions,
one by one, from the program that is stored in memory. For each instruction, the control unit informs the
processor to execute the operation specified by the instruction. Both program and data are stored in
memory. The control unit supervises the program instructions, and the processor manipulates the data as
specified by the program.

• The program and data prepared by the user are transferred into the memory unit by means of an input
device such as a keyboard. An output device, such as a printer, receives the result of the computations
and the printed results are presented to the user.
Table 2.1 Numbers with different bases Cont…
Decimal (Base 10) Binary ( Base 2) Octal( Base 8) Hexa Decimal (Base
16)
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Arithmetic Addition
Number base conversions
A binary number can be converted to decimal by forming the sum of the powers of 2
of those coefficients whose value is 1.
Example 1:
Example 2: Convert decimal 41 to binary
Example 3: Convert (0.6875)10 to binary
Cont…

Example 4 : Convert (0.513)10 to octal


Octal and Hexadecimal Numbers
Binary to Gray Code Conversion
• Binary to gray code conversion: conversion between binary code and gray code is sometimes useful. The
following rules explain how to convert from a binary number to a gray code word.

1. The most significant bit(left-most) in the gray code is the same as the corresponding MSB in the binary
number.
2. Going from left to right, add each adjacent pair of binary code bits to get the next Gray code bit. Discard
carries.
For example, the conversion of the binary number 10110 to gray code is as follows

Ø The advantage of the Gray code over binary numbers is that only one bit in the code group changes when
going from one number to the next. For example, in going from 7 to 8, the Gray code changes from 01 00 to
1100. Only the first bit from the left changes from 0 to 1; the other three bits remain the same
Gray to Binary Conversion

The most significant bit (left-most) in the binary code is the same as the corresponding bit in the Gray code.
Add each binary code bit generated to the Gray code bit in the next adjacent position.

For example, the conversion of the Gray code word 11011 to binary is as follows:
Signed Binary Numbers
• Positive integers including zero can be represented as unsigned numbers. However, to represent negative integers, we
need a notation for negative values.

• In ordinary arithmetic, a negative number is indicated by a minus sign and a positive number by a plus sign. Because
of hardware limitations, computers must represent everything with binary digits, commonly referred to as bits.

• It is customary to represent the sign with a bit placed in the leftmost position of the number. The convention is to make
the sign bit 0 for positive and 1 for negative.

For example,

a) The string of bits 01001 can be considered as 9 (unsigned binary) or a +9 (signed binary) because the leftmost bit is O.
b) The strings of bits 11001 represent the binary equivalent of 25 when considered as an unsigned number or as - 9 when
considered as a signed number because of the 1 in the leftmost position, which designates negative, and the other four
bits, which represent binary 9
Binary codes for the decimal digits

Error-Detection Code
Ø Binary information can be transmitted from one location to another by electric wires or other communication medium. Any
external noise introduced into the physical communication medium may change some of the bits from 0 to 1 or vice versa.
The purpose of an error-detection code is to detect such bit-reversal errors
Ø One of the most common ways to achieve error detection is by means of a parity bit.
Ø A parity bit is an extra bit included with a message to make the total number of l' s transmitted either odd or even
Ø If an odd parity is adopted, the P bit is chosen such that the total number of 1 's is odd in the five bits that constitute the
message and P.
Ø If an even parity is adopted, the P bit is chosen so that the total number of 1's in the five bits is even. In a particular
situation, one or the other parity is adopted, with even parity being more common.
Parity bit
Odd parity Even parity

Message P Message P
0000 1 0000 0
0001 0 0001 1
0010 0 0010 1
0011 1 0011 0
0100 0 0100 1
0101 1 0101 0
0110 1 0110 0
0111 0 0111 1
1000 0 1000 1
1001 1 1001 0
1010 1 1010 0
1011 0 1011 1
1100 1 1100 0
1101 0 1101 1
1110 0 1110 1
1111 1 1111 0
Four-bit Gray code
Decimal Binary Equivalent Gray code
Equivalent
00 0000 0000
01 0001 0001
02 0010 0011
03 0011 0010
04 0100 0110
05 0101 0111
06 0110 0101
07 0111 0100
08 1000 1100
09 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
Binary Logic : Binary logic deals with variables that take on two discrete values and with
operations that assume logical meaning. The two values the variables take may be called by
different names (e.g., True and False, Yes and No, etc.)

Definition of Binary Logic


AND: This operation is represented by a dot or by the absence of an operator. For example, x·y = z or xy = Z
is read "x AND y is equal to z." The logical operation AND is interpreted to mean that z = 1 if and only if x = 1
and y = 1; otherwise z = O. (Remember that x, y, and z are binary variables and can be equal either to 1 or 0,
and nothing else.)
Cont..
• OR: This operation is represented by a plus sign. For example, x + y = z is read "x OR y is equal to z," meaning
that z = 1 if x = 1 or if y = 1 or if both x = 1and y = 1. If both x = 0 and y = 0, then z = 0.

• NOT: This operation is represented by a prime (sometimes by a bar). For example, x' = z (or x = z) is read "not x
is equal to z," meaning that z is what x is not. In other words, if x = 1, then z = 0; but if x = 0, then z = 1.
Logic Gates
Ø Electronic digital circuits are also called logic circuits because, with the proper input, they
establish logical manipulation paths.

Ø Any desired information for computing or control can be operated upon by passing binary signals
through various combinations of logic circuits, each signal representing a variable and carrying
one bit of information.

Ø Logic circuits that perform the logical operations of AND, OR, and NOT are shown with their
symbols in Fig

You might also like