You are on page 1of 48

Digital Electronics

Lecturer: Lord Anertei Tetteh


Mobile Number:
0244993111
Lordsvision.niitei@gmail.com
Student Conduct
• Ethical behavior is an important part of engineering practice. Each professional
engineering association has a Code of Ethics, which its members are expected to
follow. Since students are in the process of becoming Professional Engineers, it is
expected that students will conduct themselves in an ethical manner.
• The KTU Code of Ethics states that engineers shall “conduct themselves with
fairness, courtesy and good faith towards clients, colleagues, employees and others;
give credit where it is due and accept, as well as give, honest and fair professional
criticism”.
• The first part of this statement discusses an engineer’s relationships with his or her
colleagues. One of the ways in which engineering students can demonstrate
courtesy to their colleagues is by helping to maintain an atmosphere that is
conducive to learning, and minimizing disruptions in class. This includes arriving
on time for lectures, turning cell phones and other electronic devices off during
lectures, not leaving or entering the class at inopportune times, and refraining from
talking to others while the instructor is talking. However, if you have questions at
any time during lectures, please feel free to ask (chances are very good that
someone else may have the same question as you do).
• For more information, please consult the University Council Guidelines for
Academic Conduct.
Academic Honesty
• In this class, students are expected to submit their own
individual work for academic credit, properly cite the
work of others, and to follow the rules for examinations.
Academic misconduct, plagiarism, and cheating will not
be tolerated. Copying of assignments is considered
academic misconduct. Students are responsible for
understanding the university’s policies on academic
integrity and academic misconduct. For more information,
please consult the University Council Regulations on
Student Academic Misconduct and the university’s
examination regulations.
Lectures:
• Website: Lecture schedule, assignments, general course information, and
announcements will be posted on the course website. Students are responsible for
keeping up-to-date with the information on the course website.

• TEXT BOOKS:
• Jain—Modern Digital Electronics, 2/e ,TMH
• Leach & Malvino—Digital Principles & Application, 5/e, TMH
• Digital Logic Design- Morries Mano, PHI.

• RECOMMENDED BOOKS
• 1. Digital Integrated Electronics- H.Taub & D.Shilling, Mc Graw Hill.
• 2. Givone—Digital Principles & Design, TMH
• 3. Digital Technology- Virendra Kumar, New Age.
• 4. Digital Circuit & Design- S.Aligahanan, S.Aribazhagan, Bikas Publishing
House.
• 5. Fundamentals of Digital Electronics & Microprocessor- Anokh Singh, A.K.
Chhabra, S.Chand.
Course Objectives and Description

• Digital system: basic logic families, basic logic gate, Boolean


algebra, minimization of logic expressions by Karnaugh Maps,
flip flops: JK, D-types, JK master-slave, latches, and shift
registers, counters, introduction to general sequential
techniques. Applications.

• A-D and D-A converters and their principles of operations.


Number system: binary, octal and hexa-decimals.
Course Content
1. Number systems and codes

2. Boolean algebra and digital logic gates

3. Minimization techniques

4. Switching circuit and logic families

5. Sequential systems
Outline

• 1.1 Digital Systems


• 1.2 Binary Numbers
• 1.3 Number-base Conversions
• 1.4 Octal and Hexadecimal Numbers
• 1.5 Complements
• 1.6 Signed Binary Numbers
• 1.7 Binary Codes
• 1.8 Binary Storage and Registers
• 1.9 Binary Logic
Assessment

• Student’s final grade will be made up of


• Presentation, attendance and assignments-20%
• Mid-semester examinations-20%
• End of semester examinations-60 %

• Method of Instruction:
• The course will include lectures, group discussions,
student presentations, , demonstrations, and student
projects
What I Expect of You

You are a “Tettehson Student”

1.Believe knowledge is powerful


2.Interested in lots of things, ahead of your time.
3.Want to use what you learn to do good things.
4.Care more about what you learn than grades and
degree requirements.
Before we get started

• Tell me so far what you don’t understand


• Tell me if I am too fast or too slow
• Tell me if you are unhappy with the
course
• Tell me before or after the lecture, during
exercises, in my office, in the corridors,
in the coffee room, by email, …
• Don’t tell me through the semester
exams.
Digital Systems and Binary
Numbers
Digital and information age
Digital computers
– General purposes
– Many scientific, industrial and commercial applications
•Digital systems
– Telephone switching exchanges
– Digital camera
– Electronic calculators, PDA's
– Digital TV
•Discrete information-processing systems
– Manipulate discrete elements of information
– For example, {1, 2, 3, …} and {A, B, C, …}…
Analog and Digital Signal
• Analog system
– The physical quantities or signals may vary continuously
over a specified range.

• Digital system
– The physical quantities or signals can assume only
discrete values.
X(t)
– Greater accuracy
X(t)

t t
Analog signal Digital signal
Digital Systems
Binary Hexa-
Decimal decimal
21 24
A. decimal--not so good, because there are few 10-state devices
that could be used to store information fingers. . .? 0 0000 0
1 0001 1
B. binary--excellent for hardware; lots of 2-state devices: 2 0010 2
switches, lights, magnetics--poor for communication: 3 0011 3
2-state devices require many digits to represent values with 4 0100 4
reasonable resolution--excellent for logic systems whose states 5 0101 5
are true and false. But binary is king because components
6 0110 6
are so easy (and cheap) to fabricate.
7 0111 7

C. octal --base 8: used to conveniently represent binary data; 8 1000 8


almost as efficient as decimal 9 1001 9
10 1010 A
D. hexadecimal--base 16: more efficient than decimal; 11 1011 B
more practical than octal because of binary digit groupings 12 1100 C
in computers 13 1101 D
14 1110 E
15 1111 F
Number System
• “The system of counting and calculating is called
number system.”
• Number system is based on some characters called
digits. The number of digits is known as BASE or
RADIX of the number system. For example binary
number system uses two characters 0 and 1 and its base
is 2.
• Computer uses following four numbers:
i) Denary (Decimal) number system
ii) Binary number system
iii) Octal number system
iv) Hexadecimal number system
Human perception

• We naturally live in a base 10 environment


• Computer exist in a base 2 environment
• So give the computer/digital system the task of
doing the conversions for us.
Bridging the Digital Device
1 6 23
6343 721 93355 3 16 6 3
2
Decimal-to-Binary
5 9
935
935
721 534 Conversion
234142715 37 2
1 3 75 3 4
5 7 1452

01 1 00
1 001 11
0 01 0 1 010 01100001
0
0 110 01
1 10 01
0 01 1
1
00100
1 1 0 0 1 10
0
1 10 1100 1
01
001
0 11 0 1 0 011 101
01 0 1 1 01
Binary-to-Decimal 11 0010 0010
0 1 1011
01 101 110 0
Conversion 1
010111101 100101011
1
0 1
1 001
0
0 1 011 1 00
011 1
00101
0 1 01
1 011 0
00
1 0100
16
Arabic Numerals
0123456789
Arabic numerals or Hindu numerals are the ten digits
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9). They are descended from
the Hindu-Arabic numeral system developed by Indian
mathematicians. The Indian numerals were adopted by
the Persian mathematicians in India, and passed on to
the Arabs further west. From there they were
transmitted to Europe in the Middle Ages. The use of
Arabic numerals spread around the world through
European trade, books and colonialism. Today they are
the most common symbolic representation of numbers
in the world.
Binary Digital Signal
• An information variable represented by physical quantity.
• For digital systems, the variable takes on discrete values.
– Two level, or binary values are the most prevalent values.
• Binary values are represented abstractly by:
– Digits 0 and 1
– Words (symbols) False (F) and True (T)
– Words (symbols) Low (L) and High (H) V(t)
– And words On and Off
Logic 1
• Binary values are represented by values
or ranges of values of physical quantities. undefine

Logic 0
t
Binary digital signal
Numbers
Natural Numbers
Zero and any number obtained by repeatedly adding one to it.

Examples: 100, 0, 45645, 32

Negative Numbers
A value less than 0, with a – sign

Examples: -24, -1, -45645, -32

Integers
A natural number, a negative number

Examples: 249, 0, - 45645, - 32

Rational Numbers
An integer or the quotient of two integers The base of a number
determines the number of
Examples: -249, -1, 0, 3/7, -2/5 different digit symbols (numerals)
and the values of digit positions2
Decimal(Denary) Numeral Numbers
•It is a based on the Arabic numeral system.
•It uses positional notation
•Use same symbols for different orders of magnitude, but
in different places, e.g., ones place, tens place, hundreds
place.
• Each next-place (order) digit adds 100,101,102,103, etc.

• Example: In decimal, 1472 means


2 - is in the ones place so multiply it by 100 (1) =2
7 - is in the tens place so multiply it by 101 (10) =70
4 - is in the one-hundreds place so multiply it by102(100) =400
1 - is in the one-thousands place so multiply it by 103 (1000) =1000

1000+400+70+2=1472
Binary Numeral Numbers
•It is a based on the binary representation (0, 1).
•It also uses positional notation
•Use the same symbols for different orders of magnitude, but
in different places, e.g., ones place, twos place, fours place.
• Each next-place (order) digit adds 20,21,22,23, etc.

• Example: In binary, 1101 means


1 - is in the ones place so multiply it by 20 (1) = 1
0 - is in the twos place so multiply it by 21 (2) = 0
1 - is in the fours place so multiply it by 22 (4) = 4
1 - is in the eights place so multiply it by 23 (8) =8
=> 8+4+0+1 = 13
Binary 1101 = Decimal 13
1101 B = 13 D
Why Binary System?
• Computers are made of a series of
switches
• Each switch has two states: ON or
OFF
• Each state can be represented by a
number – 1 for “ON” and 0 for “OFF”
Binary Number System
• Computer circuitry represents data in a pattern of ON
and OFF states of electric current. The state ON is
represented by ‘1’ and OFF is represented by ‘0’.
• Binary system is used for internal working of
electronic computers.
• The value of each digit in a figure depends upon its
weight. The weights are based on power of 2.
• Binary numbers are fundamental to the way that all
modern computers work. They are used to represent
any data stored within a computer system.
Binary Number System
• Using only 0 and 1 makes it easier to design the electronic circuits
that the computers will use.
• This is because, if the computer wants to check a value in any part of
the circuit, it only needs to detect whether or not there is any
electricity. If there is electricity, the value is 1, if there is no
electricity, the value is 0.
• If you have enough switches, you can store all sorts of data. You
could ask a question such as ‘will you give me some money?’ and you
can get an answer in binary digits:
• 0 = NO 1 = YES. This is making use of just 1 bit of data. Add
another bit and you can say more:
• 00 = NO 10 = MAYBE
• 01 = NEXT WEEK 11 = YES
Two digital signals: one with two signal levels and the other
with four signal levels
Bits

•This section explains how numbers are


stored in a computer’s memory and different
means of representing them.
A bit (binary digit) is the basic unit of
information in computing.

A nibble consists of 4 bits. A nibble


corresponds to a single hexadecimal digit.
Binary

Decimal is base 10 and has 10 digit symbols:


0,1,2,3,4,5,6,7,8,9

Binary is base 2 and has 2 digit symbols:


0,1
For a number to exist in a given base, it can only contain the digits
in that base, which range from 0 up to (but not including) the base.

What bases can these numbers be in? 122, 198, 178, G1A4

9
Decimal Number System
• Base (also called radix) = 10
– 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
• Digit Position
– Integer & fraction 2 1 0 -1 -2
• Digit Weight
Position
5 1 2 7 4
– Weight = (Base)
• Magnitude 100 10 1 0.1 0.01

– Sum of “Digit x Weight”


• Formal Notation
500 10 2 0.7 0.04
d2*B2+d1*B1+d0*B0+d-1*B-1+d-2*B-2
• When the radix of a number is something other than
10, the base is denoted by a subscript. (512.74)10
– Sometimes, the subscript 10 is added for emphasis:
Binary Number System
• Base = 2
– 2 digits { 0, 1 }, called binary digits or “bits”
• Weights
4 2 1 1/2 1/4
Position
– Weight = (Base)
1 0 1 0 1
• Magnitude
2 1 0 -1 -2
– Sum of “Bit x Weight” 2 1 0 -1 -2
1 *2 +0 *2 +1 *2 +0 *2 +1 *2
• Formal Notation
• Groups of bits 4 bits = Nibble
=(5.25)10
8 bits = Byte (101.01)2
1011

11000101
Octal Number System
• Octal was very useful when computers used
six-bit words.
64 8 1 1/8 1/64
• Base = 8
5 1 2 7 4
– 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
2 1 0 -1 -2
• Weights 2 1 0 -1 -2
5 *8 +1 *8 +2 *8 +7 *8 +4 *8
– Weight = (Base) Position
=(330.9375)10
• Magnitude
– Sum of “Digit x Weight” (512.74)8
• Formal Notation
Hexadecimal Number System
• Base = 16
– 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
• Weights 256 16 1 1/16 1/256

– Weight = (Base) Position 1 E 5 7 A


• Magnitude 2 1 0 -1 -2
– Sum of “Digit x Weight” 1 *162+14 *161+5 *160+7 *16-1+10 *16-2
• Formal Notation =(485.4765625)10
(1E5.7A)16
The Power of 2
n 2n n 2n
0 20=1 8 28=256
1 21=2 9 29=512
2 22=4 10 210=1024 Kilo

3 23=8 11 211=2048
4 24=16 12 212=4096
5 25=32 20 220=1M Mega

6 26=64 30 230=1G Giga

7 27=128 40 240=1T Tera


Addition
• Decimal Addition

1 1 Carry
5 5
+ 5 5

1 1 0
= Ten ≥ Base
 Subtract a
Base
Binary Addition
• Column Addition

1 1 1 1 1 1
1 1 1 1 0 1 = 61
+ 1 0 1 1 1 = 23

1 0 1 0 1 0 0 = 84

≥ (2)10
Binary Subtraction
• Borrow a “Base” when needed
1 2 = (10)2
0 2 2 0 0 2
1 0 0 1 1 0 1 = 77
− 1 0 1 1 1 = 23

0 1 1 0 1 1 0 = 54
Binary Multiplication
• Bit by bit
1 0 1 1 1
x 1 0 1 0
0 0 0 0 0
1 0 1 1 1
0 0 0 0 0
1 0 1 1 1

1 1 1 0 0 1 1 0
Binary Division
• 11001 ÷ 101 = 101 25 ÷ 5 = 5
• 00101
• 10111001
• 0
• 11
• 0
• 110
• 101
• 0010
• 0
• 00101
• 00101
CONVERSION
Decimal to Binary Conversions

• Converting 0.8125 to binary . . .


– You are finished when the
product is zero, or until you
have reached the desired
number of binary places.
– Our result, reading from top
to bottom is:
0.812510 = 0.11012
– This method also works
with any base. Just use the
target radix as the
multiplier.
Number Base Conversions
Evaluate
Magnitude
Octal
(Base 8)

Evaluate
Magnitude
Decimal Binary
(Base 10) (Base 2)

Hexadecimal
(Base 16)
Evaluate
Magnitude
Decimal (Integer) to Binary Conversion
• Divide the number by the ‘Base’ (=2)
• Take the remainder (either 0 or 1) as a coefficient
• Take the quotient and repeat the division

Example: (13)10
Quotient Remainder Coefficient
13/ 2 = 6 1 a0 = 1
6/ 2 = 3 0 a1 = 0
3/ 2 = 1 1 a2 = 1
1/ 2 = 0 1 a3 = 1
Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB
Decimal to Octal Conversion
Example: (175)10
Quotient Remainder Coefficient
175 / 8 = 21 7 a0 = 7
21 / 8 = 2 5 a1 = 5
2 /8= 0 2 a2 = 2
Answer: (175)10 = (a2 a1 a0)8 = (257)8

Example: (0.3125)10
Integer Fraction Coefficient
0.3125 * 8 = 2 . 5 a-1 = 2
0.5 *8= 4 . 0 a-2 = 4
Answer: (0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8
Binary − Octal Conversion
Octal Binary
• 8=2 3

0 000
• Each group of 3 bits represents
an octal digit 1 001
2 010
Assume Zeros
Example: 3 011

( 1 0 1 1 0 . 0 1 )2 4 100
5 101
6 110
( 2 6 . 2 )8 7 111

Works both ways (Binary to Octal & Octal to


Binary)
Binary − Hexadecimal Conversion
Hex Binary
• 16 = 24 0 0000
1 0001
• Each group of 4 bits represents a 2 0010
hexadecimal digit 3 0011
4 0100
5 0101
Assume Zeros 6 0110
Example: 7 0111
8 1000
( 1 0 1 1 0 . 0 1 )2 9 1001
A 1010
B 1011
C 1100
D 1101
(1 6 . 4 )16 E 1110
F 1111

Works both ways (Binary to Hex & Hex to


Binary)
Octal − Hexadecimal Conversion
• Convert to Binary as an intermediate step
Example:
( 2 6 . 2 )8

Assume Zeros Assume Zeros

( 0 1 0 1 1 0 . 0 1 0 )2

(1 6 . 4 )16

Works both ways (Octal to Hex & Hex to Octal)


Decimal, Binary, Octal and
Decimal
Hexadecimal
Binary Octal Hex
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
Takeaway

• Binary (two symbols: true and false) is the basis of


Logic Design
Any QUESTIONS?

You might also like