Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
115 views63 pages

Digital Systems Course Guide

This document provides an overview of the DCIT 203 course on Digital and Logic System Design, including the course description which introduces logic design and digital systems, the learning outcomes which cover digital terminology, components, circuits, and design principles, and an outline of the first session on number systems and different number system conversions.

Uploaded by

Schoolboy LT
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)
115 views63 pages

Digital Systems Course Guide

This document provides an overview of the DCIT 203 course on Digital and Logic System Design, including the course description which introduces logic design and digital systems, the learning outcomes which cover digital terminology, components, circuits, and design principles, and an outline of the first session on number systems and different number system conversions.

Uploaded by

Schoolboy LT
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/ 63

DCIT 203

DIGITAL AND LOGIC SYSTEM DESIGN


Session – Number System
Lecturer: Dwumfour Abdullai Aziz
Email: [email protected]
Mobile: 0260541219

UNIVERSITY OF GHANA
College of Education
College of Basic and Applied Sciences
School
School ofofContinuing
Physical and
and Distance
Mathematical
EducationSciences
2021/2022
2014/2015 – -2016/2017
2022/2023
COURSE DESCRIPTION

• This course provides a modern introduction to logic design


and the basic building blocks used in digital systems, in
particular digital computers.
• The course will provide an overview of principles and
Techniques of modern digital systems.
• It exposes students to a wide array of classic as well as
state of the art digital electronics technology.
• The course will further explore the theories and operations
of the fundamental building blocks of digital electronics.

Dwumfour Abdullai Aziz Slide 2


COURSE DESCRIPTION

• The course will also expose students to the design process


and construction of combinational and sequential logic.
• Emphasis will be placed on Technologies and Application
of wide array of digital components used within state-of-
the-art IT Systems.
• An understanding of the applications of such digital
devices embedded within telecommunications systems,
storage systems, computing systems, multimedia systems,
and computer networks.

Dwumfour Abdullai Aziz Slide 3


LEARNING OUTCOMES

At the end of the course, students are should be able to;


• Demonstrate a basic understanding of digital terminology,
digital components, and systems
• Apply digital circuit theory in a laboratory setting as it is
applied to a work situation;
• Formulate and employ a Karnaugh Map to reduce Boolean
expressions and logic circuits to their simplest forms
• Evaluate logic circuit outputs, describe the operation of logic
gates, write truth tables for logic gates, logic gate
simplification;
• Appreciate different circuit types (combinational and
Sequential circuit) and their design principles
• Understand the differences in synchronous and asynchronous
logic circuits
Dwumfour Abdullai Aziz Slide 4
LEARNING OUTCOMES

• Illustrate the operation of encoders, decoders,


multiplexers, shift registers, and wave generating circuits
• Explain the operation of flip flops, D-Flip-Flop, J-K Flip-
Flop, Flip-Flop used as a shift register;
• Design and evaluate a solution to a digital design
problem.
• Understand the design and operations of Finite State
Machine/ Automaton
• Synthesize a circuit using a logic compiler software on a
personal computer;

Slide 5
Dwumfour Abdullai Aziz
COURSE EVALUATION

The assessment of students on this course will be


constituted by the following components:

COMPONENTS OF THE GRADING SYSTEM


Grading component Percentage (%)
Assignments 10%
Quizzes 10%
Mid Semester Examination 20%
End-of-Semester Examination 60%
100%

Dwumfour Abdullai Aziz Slide 6


COURSE SESSIONS OVERVIEW

• The course is presented session by session


• Each session provides learning outcomes and what
you will be expected to know by the end of it.
• Each session also provides an overview of the
topics in that session.

Dwumfour Abdullai Aziz Slide 7


Number Systems

Dwumfour Abdullai Aziz Slide 8


OVERVIEW

Many number systems are in use in digital technology. The


most common are the binary and hexadecimal number
systems. In digital systems, the physical quantities can assume
only discrete values.
In this session you will learn how bits can be used to represent
numbers and characters. You will learn about different
numbers systems and the conversion between them. In this
session you will learn about the decimal number system, binary
numbers, decimal to binary conversion, binary arithmetic and
1’s and 2’s complement of binary numbers.

Dwumfour Abdullai Aziz Slide 9


LEARNING OUTCOME

At the end of the session, the student should be able to:


q Understand the binary number system and its similarity
to the decimal system
q Convert from binary to decimal and from decimal to
binary
q Apply arithmetic operations to binary numbers
q Determine the 1’s and 2’s complement of a binary number

Dwumfour Abdullai Aziz Slide 10


SESSION OUTLINE

The key topics to be covered in the session include:


q Decimal Number Systems
q Binary Number Systems
q Octal Number Systems
q Hexadecimal Number System
q Number System conversion

q Complement arithmetic

Dwumfour Abdullai Aziz Slide 11


READING LIST

S. Salivahanan & S. Arivazhagan (2018), Digital Circuits and


Design.

Dwumfour Abdullai Aziz Slide 12


NUMBER SYSTEM

• Number system is a set of values used to represent


different quantities
• The total number of digits used in a number system
is called its base or radix.
• The base is written after the number as subscript
• Example: numberradix

Dwumfour Abdullai Aziz Slide 13


NUMBER SYSTEM

Some important number systems are as follows.


• Decimal number system
• Binary number system
• Octal number system
• Hexadecimal number system
The decimal number system is used in general.
However, the computers use binary number
system.
The octal and hexadecimal number systems are
also used in the computer.
Dwumfour Abdullai Aziz Slide 14
NUMBER SYSTEM

Dwumfour Abdullai Aziz Slide 15


DECIMAL NUMBER SYSTEM

• An unsigned number A can be represented using n


digits in base b:
A=(an-1an-2…a2 a1 a0 .a-1a-2…a-n)b
• This representation is called positional
representation
• Each number in this system consists of digits
which are located at different positions.
• The position of first digit towards left side of the
decimal point is 0.
Dwumfour Abdullai Aziz Slide 16
• The position of second digit towards left side of the
decimal point is 1
• Similarly, the position of first digit towards right
side of decimal point is -1
• The position of second digit towards right side of
decimal point is -2 and so on.
• Decimal number system has 10 distinct symbols,
starting from 0-9

Dwumfour Abdullai Aziz Slide 17


• Given n digits number A, in base b, the number of
possible values(N) that can be addressed is given by:
N= bn
• largest value that can be addressed Amax, is given by

• For example, the largest number that can be obtained


using 3 digits in decimal is given by

Thus we have the values in the range [000:999]


Dwumfour Abdullai Aziz Slide 18
• 4 bits in base 2 is given by

• 16 different numbers can be represented


• In this case, decimal numbers ranging from 0 to 15
(corresponding to binary 0000 to 1111) can be
represented.
Dwumfour Abdullai Aziz Slide 19
NUMBER SYSTEM

• The decimal value of the integer number A is given by

E.g., A=451 can be represented in decimal as


4*102+5*101+1*100
4*100 +5*10 +1*1
400+50+1=451
Dwumfour Abdullai Aziz Slide 20
NUMBER SYSTEM

The above formula can be generalized for real numbers


as:

Example: given the decimal number 65.375 can be


written as

Dwumfour Abdullai Aziz Slide 21


Example: The weights and positions of each digit of the
number 542 are as follows:

Face value 5 4 2
Position 2 1 0
Weight 102 101 100

The above table indicates that:


The value of digit 5 = 5x102 = 500
The value of digit 4 = 4x101 = 40
The value of digit 2 = 2x100 = 2
The actual number can be found by adding the values
obtained by the digits as follows:
500 + 40 + 2 =54210
Dwumfour Abdullai Aziz Slide 22
To do:
Find the weight presentation of each of the following
numbers and compute the actual number
1. 6877
2. 357.74
3. 23.375

Dwumfour Abdullai Aziz Slide 23


BINARY NUMBER SYSTEMS

• Digital computer represents all kinds of data and


DFS information in the binary system.
• Binary Number System consists of two distinct
symbols: 0 and 1.
• It is also referred to as base 2.
• Each bit in binary number system can be 0 or 1.

Dwumfour Abdullai Aziz Slide 24


BINARY NUMBER SYSTEMS

An n-bit binary number b= bn−1 bn−2 . . . b1b0 can


represent 2n different values.
Call bn−1 the most significant bit (msb), b0 the least
significant bit (lsb).
Example:
2-bit register can represent 4 different values (22)
3-bit register can represent 8 different values(23)
2-bit presentation:10, 01, 11, 00
3-bit presentation:000, 001, 010, 100,101, 110, 011, 111
Dwumfour Abdullai Aziz Slide 25
OCTAL NUMBER SYSTEM

• Octal number system has a base or radix 8.


• Eight digits are used : 0, 1, 2, 3, 4, 5, 6, 7

Addition of Octal Number


(162)8 + (537) 8

Solution:
11 <---- carry
162
537
721

Therefore, sum = 7218


Dwumfour Abdullai Aziz Slide 26
OCTAL NUMBER SYSTEM

(136) 8 + (636) 8
Solution:
1 <---- carry
136
636
774

Therefore, sum = 7748

Dwumfour Abdullai Aziz Slide 27


OCTAL NUMBER SYSTEM

(25.27) 8 + (13.2) 8
Solution:
1 <---- carry
25.27
13.2
40.47

Therefore, sum = (40.47) 8

Dwumfour Abdullai Aziz Slide 28


OCTAL NUMBER SYSTEM

Compute the following:


1. (67.5) 8 + (45.6) 8
2. (7563) 8 + (6176) 8
3. (36.75) 8 + (47.64) 8

Dwumfour Abdullai Aziz Slide 29


HEXADECIMAL NUMBER SYSTEM

• The Hexadecimal Number System consists of 16


digits from 0 to 9 and A to F
• Thus: Uses 10 digits and 6 letters
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
• Letters represents numbers starting from 10. A = 10,
B = 11, C = 12, D = 13, E = 14, F = 15.
• Also called base 16 number system.

Dwumfour Abdullai Aziz Slide 30


• The first position from the right in a hexadecimal
number represents a 0 power of the base (16).
• Example 160
• Last position in a hexadecimal number represents an
x power of the base (16).
• Example 16x where x represents the last position - 1.
Example
13A16=1*162+3*161+A*160
C6F816=C*163+6*162+F*161+8*160

Dwumfour Abdullai Aziz Slide 31


HEXADECIMAL OPERATIONS

Addition in hexadecimal
1-->B16+416=F16
2-->C16+D16=1916
3-->A316+B516=15816
4-->4A616+1B316=65916
5-->(8 A 5 C)16 and (F 3 9 A)16

Dwumfour Abdullai Aziz Slide 32


HEXADECIMAL OPERATIONS

Subtraction in hexadecimal
1-->F-A=5
2-->AB-2C=7F
3-->158616-24316=134316
4-->5CD2-2A0=5A32
5à4A6-1B3=?
6àABC16-A3B16=?

Dwumfour Abdullai Aziz Slide 33


RADIX CONVERSION

A radix conversion algorithm is used to convert a number


representation in each radix, r1, into another
representation in a different radix, r2.
The following conversion schemes are available
• Decimal to other bases

• Other bases to Decimal

• Decimal to Hexadecimal

• Binary to Octal

• Binary to Hexadecimal

• Octal to Hexadecimal
Dwumfour Abdullai Aziz Slide 34
DECIMAL CONVERSION
In order to convert from decimal to other bases
• Step 1 − Divide the decimal number to be converted by
the value of the new base.
• Step 2 − Get the remainder from Step 1 as the rightmost
digit (least significant digit) of new base number.
• Step 3 − Divide the quotient of the previous divide by the
new base.
• Step 4 − Record the remainder from Step 3 as the next
digit (to the left) of the new base number.
• Repeat Steps 3 and 4, getting remainders from right to
left, until the quotient becomes zero in Step 3.
• The last remainder thus obtained will be the Most
Significant Digit (MSD) of the new base number.
Dwumfour Abdullai Aziz Slide 35
DECIMAL BINARY

• Conversion from decimal to binary can be performed


by successively dividing the decimal number by 2
and using each remainder as a bit of the desired
binary number.
Example:
7710=10011012
6510=1111102
12710=?
25110 = ?
Convert the following to their binary equivalent
(25.375)10
(56.75)10

Dwumfour Abdullai Aziz Slide 36


DECIMAL BINARY

Dwumfour Abdullai Aziz Slide 37


DECIMAL TO OCTAL

• Conversion from decimal to Octal can be


performed by successively dividing the decimal
number by 8 and using each remainder as a digit
of the desired octal number.
Example:
Convert 298010 to base 8
Therefore 298010 = 56448

Dwumfour Abdullai Aziz Slide 38


DECIMAL TO HEXADECIMAL

Conversion from decimal to Hexadecimal can be performed


by successively dividing the decimal number by 16 and
using each remainder as a digit of the desired hexadecimal
number.
Example:
Convert 391710 to its hexadecimal equivalent

Therefore, 391710 = F4D16Dwumfour Abdullai Aziz Slide 39


DECIMAL TO HEXADECIMAL

Convert the following decimal numerals to hexadecimal


75910 =2F716
178910=??
356.5010=??
64.68010=??

Dwumfour Abdullai Aziz Slide 40


BINARY TO DECIMAL

Thus, the decimal equivalent of a binary number has the general


form;
an-1 × 2n-1 + an-2 x 2n-2 + ….. +ai x 2i + …. + a1 x 21 + a0 x 20 + a-1 x 2-1 +
a-2 x 2-2 + …. + a-p x 2-p
BINARY TO DECIMAL
1102=(1*22)+ (1*21)+(0*20)=4+2+0=610
OCTAL TO DECIMAL
125708=(1*84)+(2*83) +(5*82)+(7*81)+ (0*80)=4397610
HEXADECIMAL TO DECIMAL
Convert the following from hex to decimal
41CF16=4*163+1*162+C*161+ F*160=1684710

Dwumfour Abdullai Aziz Slide 41


BINARY TO HEXADECIMAL

• Since a string of 4 bits has 16 different


permutations each 4-bit string represents a
hexadecimal digit uniquely.
• Thus, to convert a binary number to its
hexadecimal equivalent we arrange the bits into
groups of 4 starting at the binary point and move
towards the MSB.
• We then replace each group by the corresponding
hexadecimal digit.

Dwumfour Abdullai Aziz Slide 42


BINARY TO HEXADECIMAL

Example
11 1110 11012 = add zeros to the left of MSB
0011 1110 1101= 3ED16
Convert the following into hexadecimal
a. 101101011102 =?
b. 10010111111102 =?

Dwumfour Abdullai Aziz Slide 43


HEXADECIMAL TO BINARY

Convert the following to binary equivalents:


A74816
Solution:
A74816 = 1010 0111 0100 1000
= 10100111010010002
Convert the following hexadecimal to binary
a. FFDE16=?
b. 5ACF16=?

Dwumfour Abdullai Aziz Slide 44


NUMBER REPRESENTATION SCHEME
USING MAGNITUDE AND
COMPLEMENT

Dwumfour Abdullai Aziz Slide 45


Dwumfour Abdullai Aziz Slide 46
MAGNITUDE REPRESENTATION

Number systems such Binary, Octal, Decimal and Hexadecimal


can be represented using both signed and unsigned magnitude.
Unsigned Numbers:
• Unsigned numbers don’t have any sign, these can contain
only magnitude of the number.
• Representation of unsigned binary numbers are all positive
numbers only.
• For example, representation of positive decimal numbers
are positive by default.
• We always assume that there is a positive sign symbol in
front of every number.
Example: +6=6=110, +10=10=1010,
-6=not possible Dwumfour Abdullai Aziz Slide 47
MAGNITUDE REPRESENTATION

Unsigned magnitude representation:


• Since there is no sign bit in this unsigned binary number, so
N bit binary number represent its magnitude only. Every
number in unsigned number representation has only one
unique binary equivalent form
• The range of unsigned binary number is from 0 to (2n-1)
• Find range of 5-bit unsigned binary numbers. Also, find
minimum and maximum value in this range.
Solution: Since, range of unsigned binary number is from 0 to
(2n-1). Therefore, range of 5-bit unsigned binary number is
from 0 to (25-1) which is equal from minimum value 0 (i.e.,
00000) to maximum valueDwumfour
31 (i.e., 11111).
Abdullai Aziz Slide 48
MAGNITUDE REPRESENTATION

Signed Numbers
• Signed numbers contain sign flag, this
representation distinguish positive and negative
numbers.
• This technique contains both sign bit and
magnitude of a number.
• The MSB represent the sign bit
• Positive numbers have MSB as 0 and Negative
numbers have MSB as 1
• In representing negative decimal numbers, the
negative symbol is put in front of given number.
Dwumfour Abdullai Aziz Slide 49
MAGNITUDE REPRESENTATION

Signed Numbers
• Generally, sign bit is a most significant bit (MSB)
of representation.
• The range of Sign-Magnitude form is from
-(2n-1-1) to +(2n-1-1).
• Example: find the range of 6-bit signed magnitude
number
Solution –(25 -1) to (25-1)= -31 to 31

Dwumfour Abdullai Aziz Slide 50


COMPLEMENT ARITHMETIC

• The complements are used to make the arithmetic


operations such as subtraction in digital system easier
• The computer system use complements in most of the
number system discussed in order to make subtraction
operation on numbers easier.
• For each radix-r system (radix r represents base of
number system) there are two types of complements.
Radix Complement
The radix complement is referred to as the r's complement
Diminished Radix Complement
The diminished radix complement is referred to as the (r-
1)'s complement
Dwumfour Abdullai Aziz Slide 51
BINARY SYSTEM COMPLEMENT

• As the binary system has base r = 2.


• So, the two types of complements for the binary
system are 2's complement and 1's complement.
• One’s complement and two’s complement are two
important binary concepts.

Dwumfour Abdullai Aziz Slide 52


COMPLEMENT ARITHMETIC

Example of complement
• 1’s and 2’s complement for binary numbers
• 7’s and 8’s complement for octal numbers
• 9’s and 10’s complement for decimal numbers
• 15’s and 16’s complement for hexadecimal numbers

Dwumfour Abdullai Aziz Slide 53


1’s complement and 2’s complement

One’s Complement
If all bits in a binary number are inverted by
changing each 1 to 0 and each 0 to 1, we have
formed the one’s complement of the number
Example:
10011001 --> 01100110
10000001 --> 01111110
11110000 --> 00001111

Dwumfour Abdullai Aziz Slide 54


2’s Complement
§ The two’s complement is a method for
representing positive and negative integer
values in binary.
Rule:
§ To form the two’s complement, add 1 to the
one’s complement.

Dwumfour Abdullai Aziz Slide 55


Two’s Complement
We obtain 2’s complement by adding 1 to the 1’s
complement
Example:
01100110+1=01100111(2’s complement)
01111110+1=01111111(2’s complement)
00001111+1=00010000 (2’s complement)

Dwumfour Abdullai Aziz Slide 56


1’s complement and 2’s complement

Convert the following into 2’s complement


• -1210
• -6510

First, we convert to binary (forget about sign for


now)
1210=11002
find 1’s complement==>0011
Find 2’s complement==> [0011+1] =0100
Dwumfour Abdullai Aziz Slide 57
Let consider the following problems
Using 1’s complement compute the value of
a-->1101012-1001012=0100002
b-->1010112-1110012=-0011102
Using 2’s complement compute the value of
the problem above

Find 1’s and 2’s complement of 1510-


1010=……….2
Dwumfour Abdullai Aziz Slide 58
DECIMAL COMPLEMENT ARITHMETIC

9’s and 10’s complement


• This complement system provides an easy way of
performing subtraction operation on decimal numbers
• To work in complement arithmetic , we need to convert the
decimal number to its 9’s or 10’s complement equivalence.
• 9′s complement of decimal number can be obtained by
((10n - 1)-number) where n represents the number of digits
in given number.
• 10′s complement can be obtained by (10n – number) where
n represents the number of digits in given number.

Dwumfour Abdullai Aziz Slide 59


DECIMAL COMPLEMENT ARITHMETIC

Example 9’s complement of 115 is given by


((103-1)-115)=884
10’s complement of 115 is given by
884+1=885
9’s complement of 1984 is given by
((104-1)-1984)=8015
10’s complement of 1984 is given by
8015+1=8016
Find 9’s and 10’s complement of the following
a. 2000
b. 1234
c. 48 Dwumfour Abdullai Aziz Slide 60
Using 9’s and 10’s complement arithmetic to compute 251-185
251-185=>251+(-185)
Convert 185 to 9’s complement=>(999-185)=814
10’s complement of 185=>814+1=815
251+815 251
815
1066

Drop the carry (1) so we have 66 which is equivalent to 251-


185
Note: If the final answer of the summation does not have carry,
we find 10’s complement of the answer and add negative sign
Dwumfour Abdullai Aziz Slide 61
TAKE HOME EXERCISE

Perform the following operations with


the given complement arithmetic
a) 4478-4158 using 8’s complement
b) AFD16-BC516 using 16’s complement
Take home Exercise

c) 98110-51910 using 2’s complement


d) FAB16-DAD16 using 9’s complement

Dwumfour Abdullai Aziz Slide 62


Dwumfour Abdullai Aziz Slide 63

You might also like