7/28/2019 ESZC261-L1
1/26
BITS PilaniPilani Campus
BITS Pilanipresentation
Rekha.AFaculty
7/28/2019 ESZC261-L1
2/26
BITS Pilani, Pilani Campus
Course Outline
Digital design basics and number systems Binary logic gates Boolean algebra and K-map simplification
Arithmetic logic units Flip-flops Registers and counters
Introduction to microprocessors Architecture Instruction set and programming Memory and I/O interfacing Examples of system design
ESZC261 Digital Electronics and Microprocessors
7/28/2019 ESZC261-L1
3/26
BITS Pilani, Pilani Campus
In Science , Technology, business we are constantly dealing with the quantities.
Quantities are measured, monitored, recorded etc. It is important that we be able torepresent their values efficiently and accurately.
Two basic ways of representing the numerical values of the quantity: Analog andDigital.
Analog representation of a quantity is represented by a voltage , current or meter movement that is proportional to the value of the quantity. Analog quantities canvary over a continuous range of values.
In digital representation the quantities are represented by symbols called digits. It isdiscrete.
Many number system are in use in Digital technology.
Decimal, Binary, Octal and Hexadecimal.
Digital systems and Binary numbers
7/28/2019 ESZC261-L1
4/26
BITS Pilani, Pilani Campus
Decimal system : Composed of 10 numerals or symbols i.e 0,1,2,3,4,5,6,7,8,9. Alsocalled base 10 system.
In decimal system the value of the digit depends on its position . eg: 3763 carries most weight and hence called MSD, 6 carries least weight and hencecalled LSD.
Binary system , there are only two symbols 0 &1. It is also called as base 2.
Octal System : Composed of 8 symbols i.e 0-7
Hexadecimal System ; Composed of 16 symbols i.e 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
5/26
BITS Pilani, Pilani Campus
Digital System Takes a set of discrete information inputs and discrete internal
information (system state) and generates a set of discrete
information outputs .
System State
DiscreteInformationProcessingSystem
DiscreteInputs Discrete
Outputs
ESZC261 Digital Electronics and Microprocessors
7/28/2019 ESZC261-L1
6/26
BITS Pilani, Pilani Campus
Types of Digital Systems
ESZC261 Digital Electronics and Microprocessors
No state present Combinational Logic System Output = Function(Input)
State present State updated at discrete times=> Synchronous Sequential System
State updated at any time=>Asynchronous Sequential System
State = Function (State, Input) Output = Function (State)
or Function (State, Input)
7/28/2019 ESZC261-L1
7/26
BITS Pilani, Pilani Campus
A Digital Computer Example
ESZC261 Digital Electronics and Microprocessors
Memory
Controlunit Datapath
Input/Output
CPU
Inputs:Keyboard,
mouse, modem,microphone
Outputs: CRT,LCD, modem,
speakers
7/28/2019 ESZC261-L1
8/26
BITS Pilani, Pilani Campus
Signal
ESZC261 Digital Electronics and Microprocessors
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 indigital systems.
Binary values are represented abstractly by: digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) and words On and Off.
Binary values are represented by values or ranges of values of physical quantities
7/28/2019 ESZC261-L1
9/26
BITS Pilani, Pilani Campus
ESZC261 Digital Electronics and Microprocessors
Signal Examples Over Time
Analog
Asynchronous
Synchronous
TimeContinuousin value &
timeDiscrete in
value &continuous
in timeDiscrete in
value &time
Digital
7/28/2019 ESZC261-L1
10/26
BITS Pilani, Pilani Campus
Binary to Decimal
Binary number system is a positional system
Illustration 1:1 1 0 1 1 (binary)
24 + 2 3 + 2 2 + 2 1 + 2 0 = 16+8+2+1=27 10 (Decimal)
Illustration 21 0 1 1 0 1 0 1 (Binary)27 + 2 6 + 2 5 + 2 4 + 2 3 + 2 2 + 2 1 + 2 0 = 181(Decimal)
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
11/26
BITS Pilani, Pilani Campus
Decimal to Binary : Conversion can be done by repeatedly dividing the decimalnumber by 2.
Illustration 1;Convert the decimal number 25 to binary
25/2 = 12 + remainder of 1
12/2 =6 + remainder of 06/2 = 3 + remainder of 03/2= 1 + remainder of 1(25) 10 = (11001) 2
Illustration 2:Convert the decimal number 37 to Binary
37/2 = 18 + remainder of 118/2 = 9 + remainder of 09/2 = 4 + remainder 14/2 =2 + remainder 02/2 = 1 + remainder 0(37) 10 = (100101) 2
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
12/26
BITS Pilani, Pilani Campus
Octal Number systemOctal to decimal conversion: An octal number can be converted to its decimal
equivalent by multiplying each octal digit by its positional weight.Example:
372 8 = 3*82 + 7*81 + 2*80
= 3*64 + 7*8 + 2*1=250 10
Decimal to Octal A decimal integer can be converted to octal by repeated division by 8Example:
Convert the decimal number 266 to Octal266/8 = 33 + remainder 233/8 = 4 + remainder 1266 10 = 412 8
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
13/26
BITS Pilani, Pilani Campus
Octal to Binary conversionThe primary advantage of the octal number is the ease with which theconversion can be made between the binary and the octal number Example: Convert the octal number 472 to binary
4 7 2100 111 010
472 8 = 100111010 2
Example 2: Convert the octal number 2435 to binary2 4 3 5010 100 011 1012435 8 = 010100011101 2
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
14/26
BITS Pilani, Pilani Campus
Binary to Octal
Example: Convert the Binary number 100111010 to octal100 111 0104 7 2
100111101 2 = 472 8Usefulness of octal system: when dealing with a large quantity of binary
numbers of many bits, it is convenient and more efficient to write numbers inoctal.
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
15/26
BITS Pilani, Pilani Campus
HEXADECIMAL NUMBER SYSTEM
Hex to decimal conversion
Example: Convert the (2AF) 16 to decimal
(2AF)16 = 2*16 2 + 10*16 1+ 15*16 0= 512+160+15
= 687 10
Decimal to HEX conversion
Example: Convert 423 10to HEX423/16 = 26 + remainder 726/16 = 1 + remainder 10423 10 = 1A7 16
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
16/26
BITS Pilani, Pilani Campus
Binary to HEX Conversion
Example: Convert (1110110010011110) 2 to HEX1110 1100 1001 1110
D C 9 D
1110110010011110 2 = DC9D 16
HEX to Binary
Example: Convert ( AFE5) 16 to Binary A F E 51010 1111 1110 0101
AFE5 16 = 1010111111100101 2
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
17/26
BITS Pilani, Pilani Campus
HEX to OCTAL conversion
Example: Convert B2F 16 to octal
B2F 16 = 1011 0010 1111 (convert to binary)= 101 100 101 111 (group into 3 bit groupings)
= 5 4 5 7 (convert to octal)
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
18/26
BITS Pilani, Pilani Campus
BCD CodeIf each digit of the decimal number is represented by its binary equivalent , the result is a
code called Binary coded Decimal (BCD). Since a decimal digit can be as large as 9,four bits are required to code each digit.
Suppose ,6 3 8 (Decimal)0110 0011 1000 (BCD)
ASCII ( American Standard code for Information Interchange)
The ASCII code is a 7 bit code, so it has 27 possible code groups. This is more thanenough to represent all the standard keyboard characters as well as the controlfunctions such as , . The ASCII code is used for thetransfer of alphanumeric information between a computer and the input/outputdevices.
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
19/26
BITS Pilani, Pilani Campus
American standard Code for Information Interchange(ASCII)
7/28/2019 ESZC261-L1
20/26
BITS Pilani, Pilani Campus
Example1: Encode the following message in ASCII code using the HEX representation :COST = $72
Solution : 43 ,4F , 53,54, 20, 3D, 20, 24, 37, 32
Example 2:
The following ASCII coded message is stored in successive memory locations in a computer1010011 1010100 1001111 1010000
What is the message?
Ans: STOP
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
21/26
BITS Pilani, Pilani Campus
GRAY CODE
The output data of many physical systems are quantities that are continuous
The data must be converted to digital form before they are applied to the digitalsystem
The Advantage of the gray code over the straight binary code is that only one bit inthe code group changes in going from one number to the next number.
Gray code is also referred to as the reflected code
The gray code is used in applications in which normal sequence of binary numbersmay produce an error or ambiguity during the transition from one number toanother.
7/28/2019 ESZC261-L1
22/26
BITS Pilani, Pilani Campus
ESZC261 Digital Electronics and Microprocessors
7/28/2019 ESZC261-L1
23/26
BITS Pilani, Pilani Campus
ESZC261 Digital Electronics and Microprocessors
7/28/2019 ESZC261-L1
24/26
BITS Pilani, Pilani Campus
Parity method for error detection
The movement of binary data and codes from one location to another is themost frequent operation performed in the digital system.
When ever the information is being transmitted from one device to another,there is possibility that error can occur such that the receiver does notreceive the identical information that was sent.
For this reason digital systems employ some method for detection of errors.
One of the simplest and most widely used schemes for error detection is theparity method.
Topic: Number systems and codes.
7/28/2019 ESZC261-L1
25/26
BITS Pilani, Pilani Campus
A parity bit is an extra bit that is attached to a code group that is beingtransferred from one location to another. The parity bit is made either 1 or 0.
In the even parity method, the value of the parity bit is chosen so that thetotal number of 1s in the code (including the parity bit) is an even number. If the code is 1000011, the new code group including the parity bit becomes,11000011.
The odd parity method is used exactly the same way except that the paritychosen so that total no. of 1s is an odd number. If suppose the code is1000010, then the code after the parity it is added becomes 11000010.
7/28/2019 ESZC261-L1
26/26
BITS Pilani, Pilani Campus
Example 1: Attach an odd parity bit to the ASCII code for the $ symbol andexpress the result in hex decimal.
Solution: The 7 Bit ASCII code for symbol $ is 010 0100
For odd parity the code becomes 1010 0100,
Therefore Hexa decimal representation becomes A4.
Example 2: Attach an even parity bit to the BCD code for decimal 69,
Solution: BCD code for decimal 69 is 01101001 After adding the even parity the code becomes 001101001
Topic: Number systems and codes.