Digital Electronics (De) (A27H5) : Digital Logic Design and Computer Organizaton (Dld&Co)
Digital Electronics (De) (A27H5) : Digital Logic Design and Computer Organizaton (Dld&Co)
Digital Electronics (De) (A27H5) : Digital Logic Design and Computer Organizaton (Dld&Co)
6/11/2018
D.SAMEERA, ASST.PROF,BVRIT
DIGITAL ELECTRONICS (DE) (A27H5)
DIGITAL LOGIC DESIGN AND COMPUTER ORGANIZATON (DLD&CO)
D.SAMEERA
ASSISTANT PROFESSOR, M.TECH (CSE),(Ph.D.)
12+ YR EXP.
BVRIT, NARSAPUR
2
6/11/2018
D.SAMEERA, ASST.PROF,BVRIT
UNIT – 1
PART -1
BASIC STRUCTURE OF COMPUTERS
5
INTRODUCTION :
Ex : Embedded Systems
Digital computer :Fast electronic calculating machine .List of instructions processes and given output.
Many types of computers exits that differ widely in size, cost, computational power, and intend use.
1. Personal computer Ex: desktop
2. Notebook computers Ex: iPad
3. Workstations Ex: movie graphics , bhahubali
4. Enterprise systems Ex: Mainframes
5. Servers Ex: jntu server, all organization servers
6. Supercomputers Ex: whether forecasting, simulation, aircraft etc..
2 5
3 6
OUTPUT CONTROL
INPUT / PROSESSOR
OUTPUT
List of instructions is stored in memory, individual instructions are brought from the
memory into processor, execute the specified operations. EX: Tracking with F7 in C
Ex : ADD Loc A , R0 Register
Operand added at memory
Instruction
location
Finally places the sum in R0. [R0 = Value in address + R0 value]
Ex: LOAD Loc A , R1 [Load instruction of Loc A to R1]
ADD R1 , R0 [Adds the contents of registers R1 & R0,Places sum in R0]
The bits are transferred simultaneously over many wires , OR lines one Bit per line.
a group of Lines that serves as a connecting path for several devises is called a bus.
Is carries data, address and control purpose.
For Interconnecting functional units and it take one transfer at a time only 2 units can actively use the bus .
Single bus :structure low cost flexibility
Multiple buses : high cost it can Carry two or more transfer at same time .
OUTPU MEMOR PROCESSO
INPUT Y R
T
In order for a user to enter and run an application program ,the computer must already contain some
system software in its memory.
A programmer using a high level language need not to know the details of machine program instructions .
a) Compiler: is system software program called compiler.
It Translate the high level language program into a suitable machine language programme containing instructions
such as the ADD, LOAD instructions
b) Text editor : entering and editing application programs
source program entering at a keyboard and stored in a file. (Simply a sequence of alpha numeric characters or
binary data stored in memory )
c) Operating system : is a large program collection of routines that is used to control the sharing of and
interaction among computer units As they execute application programs . Ex: Printer (Interrupt routine)
The most important measure of the performance of a computer is how quickly it in execute programs .
For fetching instructions to getting results . The sum of this period As the processor time needed to
execute a program .
Super scalar :
I1 C1 1—C1-C3--1—C2---1—C3---1
I2 C2
I3 C1
I4 C3 Two instructions are executed at same clock cycle.
4. clock rate:
There are 2 possibilities to improve clock rate : 1. Improving Integrated circuits technology
2. reduce the amount of processing done or clock period.
Ex: Old days TV to LCD & LED.
FOURTH GENERATION:
Introduced large sections of the main memory of small computers could be implemented on single chip.
Very large scale integration [VLSI] (1000 ‘s of transistors could be placed)
MICROPROCESSOR
FIFTH GENERATION:
New features are added and introduced artificial intelligence, parallel mechanism, distributed systems.
6/11/2018
D.SAMEERA, ASST.PROF,BVRIT
UNIT – 1
PART -2
DATA REPRESENTATION
23
6/11/2018
D.SAMEERA, ASST.PROF,BVRIT
UNIT-I: Number System Classes: 8
The term data refer to factual information used for analysis or reasoning.
Data itself has no meaning, becomes information when it is assigned a meaning.
The register stored information i.e. in different formats BITS,NUMBERS,& other binary coded information.
Data types found in registers of digital computers:
Numbers
Letters of the alphabet
Other discrete symbols
Binary coded form made up of flipflops means 0’s and 1’s.
The numeric system we use daily is the decimal system. But machine understands binary .
Ex : decimal 7 converted binary with 4 bit code is 0111. means decimal 1 digit is equal to binary 4 digits.
A base of a number system or radix defines the range of values that a digit may have.
In the binary system or base 2, there can be only two values for each digit of a number, either a "0" or a "1".
In the octal system or base 8, there can be eight choices for each digit of a number:
"0", "1", "2", "3", "4", "5", "6", "7".
In the decimal system or base 10, there are ten different values for each digit of a number: "0", "1", "2", "3", "
4", "5", "6", "7", "8", "9".
In the hexadecimal system, we allow 16 values for each digit of a number: "0", "1", "2", "3", "4", "5", "6", "7", "
8", "9", "A", "B", "C", "D", "E", and "F".
Where “A” stands for 10, “B” for 11 and so on.
D.SAMEERA, ASST.PROF,BVRIT 6/11/2018
26
DECIMAL to DECIMAL:
The decimal no. system radix = 10. symbols are 0,1,2,3,4,5,6,7,8,9 , String = 724.5
Conversion (724.5)10 = 7*102+2*101+4*100+5*10-1 [NOTE : n…3 2 1 0 -1 -2 -3… -n ]
OCTAL to DECIMAL:
The Octal no. system radix = 8 symbols are 0,1,2,3,4,5,6,7 , String = 736.4
Conversion (736.4)8 = 7*82+3*81+6*80+4*8-1 = (478.5)10
HEXA to DECIMAL:
The Octal no. system radix = 16 symbols are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F , String = F3
Conversion (F3)8 = F*161+3*160 = 15*16+3= (243)10
The decimal no. system radix = 10. symbols are 0,1,2,3,4,5,6,7,8,9 , String = 41.6875
In this string system is carried out by separating the number into 2 parts Integer & fraction .
(41.6875)10 Integer = 41 & fraction = 0.6875
Divisions by r Multiply by r 0.6875
2 |41 2
|20 | 1 ______________________
1.0000
The conversions from and to binary ,octal & hexadecimal representation plays an important part in digital
computers.
Since, 23 =8, and 24 =16.,each octal digits correspondence to 3 binary digits.
Each hexadecimal digits correspondence to 4 binary digits.
Partition the binary number into groups of 3 bits.
OCT 1 2 7 5 4 3
Ex: BINARY
DEC 1 0 1 0 1 1 1 1 0 1 1 0 0 0 1 1
HEXA A F 6 3
!6-bit Register Can Be Used To Store Any Binary No. From 0 To 216-1.
Alphanumeric Representation
Alphanumeric character set.
10 decimal digits, 26 letters, special character($, +, =,….)
or 101101 = 010010 [all 0’s becomes 1’s and 1’s become 0’s]
Ex: 1. 1011000 2. 0101101 26 =64 LCM (64) = 1000000
D.SAMEERA, ASST.PROF,BVRIT 6/11/2018
41
https://www.powtoon.com/s/cdZjT5Xr1o0/1/m
6/11/2018
D.SAMEERA, ASST.PROF,BVRIT
Subtraction of Unsigned Numbers
1) If M + (rn-N) (M=Minuend, N= Subtrahend) 44
2) If M N : Discard end carry, Result = M-N
3) If M N : No end carry, Result = - r’s complement of (N-M)
MN
[x-y means x+(2’s or 10’s complement of y)] MN
13250(M) - 72532(N) = -59282
Decimal Example)
13250
72532(M) - 13250(N) = 59282 No End Carry + 27468 (10’s complement of 72532)
72532 00 40718
Result = -(10’s complement of 40718)
Discard End + 86750 (10’s complement of 13250)
Carry = -(59281+1) = -59282
11 59282
Result = 59282
XY Binary Example) XY 1000011(X) - 1010100(Y) = -0010001
1000011
1010100(X) - 1000011(Y) = 0010001 + 0101100 (2’s complement of 1010100)
1010100 0 1101111
Result = -(2’s complement of 1101111)
+ 0111101 (2’s complement of 1000011)
= -(0010000+1) = -0010001
1 0010001
Result = 0010001
Here take the 2’s complement of the subtrahend(N) (including sign bit) and add it to the
Minuend(M)(Including the sign bit).
Subtraction is changed to an Addition
-6 11111010
(± A) - (+ B) = (± A) + (- B) +13 0 0 0 0 1 1 0 1
(± A) - ( - B) = (± A) + (+ B) ----------------------------
+7 1 0 0 0 0 0 1 1 1
Ex: (-6)-(-13) = +7 [ If we take 8 bit code] [Here –n means 2’s complement of (n)] Discard end carry
+6 = 00000110 -6 = 11111010
+13 = 00001101 -13 = 11110011
The binary numbers in the 2’s complement system are added and subtracted by the same basic addition
and subtraction rules as unsigned numbers.
An overflow may occur if the two numbers added are both positive or both negative
When two unsigned numbers are added
an overflow is detected from the end carry out of the MSB position* Overflow
+ve –ve +ve –ve
When two signed numbers are added carries 0 1 carries 1 0
+ 70 0 1000110 - 70 1 0111010
the MSB always represents the sign
+ 80 0 1010000 - 80 1 0110000
- the sign bit is treated as part of the number -------- ---------------- ------ ---------------
+ 150 1 0010110 - 150 0 1101010
- the end carry does not indicate an overflow
If these two carries are not equal, an overflow condition is produced(Exclusive-OR gate = 1)
Computers must represent everything with 1’s (-ve) and 0’s(+ve), including the sign of a number and fixed/
floating point number
2 ways to represent Numeric Data
1) Fixed Point
2) Floating Point
Binary/Decimal Point
The position of the binary/decimal point is needed to represent fractions, integers, or mixed integer-fraction
number
A 4 bit decimal code requires four F/Fs for each decimal digit
The representation of 4385 in BCD requires 16 F/Fs (0100 0011 1000 0101)
The representation in decimal is wasting a considerable amount of storage space and the circuits required
to perform decimal arithmetic are more complex
* (+375) + (-240)
375 + (10’s comp of 240)= 375 +
760
Many computers have direct decimal number in BCD for calculations ,if not it convert to binary BCD.
GRAY CODE:
This is a variable weighted code and is cyclic.
This means that it is arranged so that every transition from one value to the next value involves only one bit change.
(Ex: K-Map)
The gray code is sometimes referred to as reflected binary. (mainly used for correcting errors in digital communications)
Binary number → Gray code
1 0 1 0 1 1 0 0 1 1 1 (binary number)
1 1 1 1 1 0 1 0 1 0 0 (gray code)
1 1 1 1 1 0 1 0 1 0 0 (gray code)
1 0 1 0 1 1 0 0 1 1 1 (binary number)
BCD: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
The position weights of the BCD code are 8, 4, 2, 1. Other codes (shown in the table) use position weights
of 8, 4, -2, -1 and 2, 4, 2, 1.
D.SAMEERA, ASST.PROF,BVRIT 6/11/2018
60
COMPUTER TYPES:
EVEN PARITY
It is concept of detect errors. So transmitter knows noise is
A single bit error is detected by it. Exam Original signal PARITY replacing any bit in original signal
ple BIT
for making no.of 1’s even in even
Transmitt 1. 0100 1 parity/odd in odd parity.
Receiver
4-bit signal er 2. 1100 0 Transmitter sends this signal like : 0
1 0 1 in place of 0 1 0 0.
ODD PARITY
There are 2 types of parity bits are Exampl Original signal PARITY
Receiver itself understand this and
there. e BIT identify noise .
EVEN PARITY 1. 0100 0 Here 1 is
ODD PARITY 2. 1100 1 noise.
Because it
replaced 0.
Data bits
D7 D6 D5 P4 D3 P2 P1
Parity bits
P4 = D5 D6 D7 1 1 1 0 1 0 1
Now take an example : data which I want to send
from Transmitter to receiver is : 1 0 1 1 P1 = 1 means D3 D5 D7 are 1 1 1 .for making even P1 is
1 0 1 0 1 0 1 1. √
Now need to find parity bits in EVEN CODE based. P2 = 0 means 1 1 1 here odd 1’s but P2 is 0 means ×
P1 = D3 D5 D7 1 1 1 so odd 1’s so P1 = 1
P4 = 0 means 1 1 1 here odd 1’s but P4 is 0 means ×
P2 = D3 D6 D7 1 0 1 so even 1’s so P1 = 0
P4 = D5 D6 D7 1 0 1 so even 1’s so P1 = 0 In this way error is detected .
Now receiver sends data of 7 bit with noise like:
1110101.
Now transmitter need to detect error.
0 1 1 1 For this no
controversy so P1 is
0.
If u find controversies like this keep
that Parity bit value is 1. means P4
D.SAMEERA, ASST.PROF,BVRIT
is 1 & P2 is 1. 6/11/2018
69