Professional Documents
Culture Documents
Digital Computers-Digital Number System-Number system and Codes Fundamentals of Logic and Combinational Logic CircuitsDigital Arthmatic- Interfacing with Analog System Microprocessors & Memories
Syllabus-Unit 2
1. Digital Computers-Digital Number System-Number system and Codes 2. Fundamentals of Logic and Combinational Logic Circuits-Digital Arthmatic- Interfacing with Analog System 3. Microprocessors & Memories
Number Systems
Types and Conversion from one to the other
Symbols
0, 1, 9 0, 1
Octal
Hexadecimal
8
16
0, 1, 7
0, 1, 9, A, B, F
No
No
No
No
Binary
Hexadecimal
pp. 40-46
8
Quick Example
Binary to Decimal
Decimal Octal
Binary
Hexadecimal
10
11
Decimel to Binary
12510 = ?2 2 125 2 62 2 31 2 15 7 2 3 2 1 2 0 1 0 1 1 1 1 1
12510 = 11111012
12
Octal to Decimal
Technique
Multiply each bit by 8n, where n is the weight of the bit The weight is the position of the bit, starting from 0 on the right Add the results
13
14
Octal to Decimal
Convert 1256 in Octal to Decimel 1 2 5 6= 6 x 80 + 5 x 81 + 2 x 82 + 1 x 83 = 6 + 40 + 128 + 512 = 686
15
Hexadecimal to Decimal
Decimal Octal
Binary
Hexadecimal
16
Hexadecimal to Decimal
Technique
Multiply each bit by 16n, where n is the weight of the bit The weight is the position of the bit, starting from 0 on the right Add the results
17
Example
ABC16 =>
18
Tutorial
1. Convert 10111, 10111001 to Binary Ans=23, 185 2. Convert 88 to Binary-ans 01011000 3. Convert Decimel 22, 65 to Hexadecimel Ans= 16,41 4. Convert Hexadecimel 22, 34, 82 to decimel-Ans=34, 52, 130
19
Codes
Basic types
20
Types of Codes
1. 2. 3. 4. Binary Coded Decimel- BCD Excess 3 Code Gray Code Alphanumeric Codes- containing Alphabets and Symbols like @, $, % etc in ASCII form American Standard Code for Information Interchange 5. Error Detecting and Correction Codes
21
3 parts: sign, mantissa and exponent The base (radix) is assumed to be 2. Sign bit: 0 for positive, 1 for negative.
sign mantissa exponent
CS2100
22
23
24
X 0 1
Y 1 0
25
AND Gate
AND X Z Y Z = X & Y X 0 0 1 1 Y 0 1 0 1 Z 0 0 0 1
26
AND Operation
Boolean expression for the AND operation: x =A B The above expression is read as x equals A AND B
NAND Gate
NAND X Z Y Z = ~(X & Y) nand(Z,X,Y) X 0 0 1 1 Y 0 1 0 1 Z 1 1 1 0
29
OR Gate
OR X Y Z = X | Y Z X 0 0 1 1 Y 0 1 0 1 Z 0 1 1 1
30
OR Operation
Boolean expression for the OR operation: x =A + B The above expression is read as x equals A OR B Figure 3-2
Example 3-1
Using an OR gate in an alarm system(refer to Fg03-04.ckt)
NOR Gate
NOR X Y Z X 0 0 1 1 Y 0 1 0 1 Z 1 0 0 0
Z = ~(X | Y) nor(Z,X,Y)
33
De Morgans Theorem-1
~(X & Y) = ~X | ~Y
NOT all variables Change & to | and | to & NOT the result
34
DeMorgans Theorems
DeMorgans Theorems are two additional simplification techniques that can be used to simplify Boolean expressions. Again, the simpler the Boolean expression, the simpler the resulting logic.
A B A B A B A B
35
35
NOR Gate
X
Y Z X Z Y
Z = ~(X | Y) X 0 0 1 1 Y 0 1 0 1 Z 1 0 0 0
Z = ~X & ~Y
X 0 0 1 1 Y ~X ~Y 0 1 1 1 1 0 0 0 1 1 0 0 Z 1 0 0 0
36
Exclusive-OR Gate
XOR X Z Y Z = X ^ Y xor(Z,X,Y)
X Y
0 0 1 1 0 1 0 1
Z
0 1 1 0
37
Logic Families
DTL logic TTL logic RTL logic CMOS logic
38
Available ICs
COMBINATIONAL LOGIC
Combinational logic circuit receive binary information on a single input and sends this information to one of many possible output lines Single input to Many outputs Output of Combinational Logic depend on Input
40
Combinational Circuit-schematic
A combinational logic circuit has:
A set of m Boolean inputs, A set of n Boolean outputs, and Output depend on current status of Input
A block diagram:
Combinatorial Logic Circuit
m Boolean Inputs
n Boolean Outputs
41
Demultiplexers
. The output is selected by the binary value on the select lines.
42
DIGITAL COMPUTERS
Types, and Schematic
43
Types of Computer
1. Desktop 2. Work Station (Powerful Single User computer) 3. Min Frame Computer-Powerful Multi user computer 4. Super Computer-performing millions of instructions 5. Mini Computer-between Work station and main Frame computer
44
Digital Computer
45
46
Output Port
Data Bus
C P U
47
Elements of a Computer
CPU=Mother board, RAM+ ROM Input Port- Keyboard, Mouse, Camera Output Port-Printer Unidirectional Address Bus-carries control information between the CPU and main memory Bi Directional Data Bus-carries data between all the hardware components of the computer Uni directional Control Bus-used by CPUs for communicating with other devices within the computer.
48
Parts of a Computer
CPU consisting of Mother board- a PCB - the foundation of a computer CPU, RAM to function with each other Mother board has BIOS,CMOS RAM for permanent info. Storage Input/Output devices
49
ADC
51
API
52
55
MICROPROCESSOR
Types, Architecture and functions
56
57
Basic Microprocessors
1. 2. 3. 4. 5. 8085 8 Bit uP 8086 16 Bit 286 386 & 486 obsolete Pentium I v th generation of 8086 Pentium II to Dual Core Processor
58
Specification of Microprocessor
1. Risc or Cisc 2. Data Bus speed =8 bit to 256 bit or (x 86) as in Intel and registers (8 bit to 32 Bit) 3. Supply Voltage from -5V to +5V 4. Clock Speed-speed at which devices connected to the Bus operate-3Mhz to 2.5 GHz 5. Number of Input/output ports 6. TCP/IP ports 7. USB ports
59
60
Pentium Processor
61
Manufacturer of Microprocessor
Intel-USA-CISC Power PC- RISC-Reduced Instruction Set Computer-32 Bit Motorola 6800-16 Bit & 32 Bit MIP RISC Microprocessor Athelon
62
Microprocessor Scheme
CP
MPU
RESET
63
Microprocessor Scheme
1. Unidirectional Address bus ( 8 bit width , 16 or 32 bit width) sending an address to memory 2. Bidirectional Data bus ( 8, 16 or 32 bits wide) sending data to memory or receive data from memory 3. Unidirectional Control Bus: RD (read) and WR (write) Control bus to get the addressed location 4. Clock for pulse sequence to the processor 5. Reset line resetting the program counter to zero (or whatever) and restarting execution
64
Buses in a Desktop
65
Microprocessor Scheme
1. CPU or central processing unit -- a complete computation engine , fabricated on a single chip. 2. Register- a memory from 8 Bit to 128 Bit 3. ALU- Arithmetic logic unit for all mathematical operations 4. A Clock for set and reset
66
Elements of P
1.ALU
2. Register Array
3.Control Unit
67
Elements of P
1. 2. 3. 4. ALU Register (memory from 8 Bit to 128 Bit Control Unit Buses namely Address Bus, Control Bus & Data Bus 5. A reset line for Resetting and Starting 6. A clock
68
Microprocessor Basic
69
8085 P
Basic features, Architecture,
70
8085
General Purpose 8 Bit microprocessor, addressing 64 K Byte memory It is a single chip N Mos Work on +5V at a max frequency of 3 MHZ
71
8085 P
72
Buses of 8085
1. 8 Bit Data Bus- Do to D7 going from the CPU to Memory and Input/Output port Bidirectional 2. 16 Bit Address Bus Ao to A15 from CPU to memory and Input/Output Port Unidirectional 3. 16 Bit Control Bus Co to C15
73
Architecture of 8085 uP
1. 8 Bit Microprocessor 2. 16 Bit Address Bus from Ao to A15 with 216 memory locations=64kBit 3. 8 Line Data Bus from Do to D7 4. 16 Bit Program Counter-PC 5. Has 16 Bit Stack Pointer 6. Require +5V & operating on 3.2 MHz clock
74
Architecture of P 8085
76
1. Data Bus:
Data bus Bi Directional -a group of eight lines D0 to D7 used for data flow. Data flow in both directions between the MPU and memory and peripheral devices. MPU using the data bus to perform the second function: transferring binary information. Eight data lines enable the MPU to manipulate 8-bit data ranging from 00 to FF (28 = 256 numbers). The largest number that can appear on the data bus is 1111 1111.
77
78
2. Address Bus:
Unidirectional address bus a group of 16 lines generally identified as A0 to A15. Address bus bits flow in one directionfrom the MPU to peripheral devices. MPU consisting of ALU,Accumulator and General Purpose Register-using the address bus for identifying a peripheral or a memory location
79
80
3. Control Bus
Control bus Unidirectional-carrying synchronization signals and providing timing signals to Memory, Input and Output devices MPU generates specific control signals for every operation performed. Control signals used to identify a device type which the MPU is communicating.
81
4. Register
8085 having 6 general-purpose 8 bit registers B,C,D,E,H & L to store 8-bit data for program execution. B,C,D,E,H,L registers combined as register pairs-BC, DE, and HL-for performing some 16-bit operations
82
REGISTERS IN 8085
1. Accumulator register-high order register 2. Temporary register, 3. Instruction register, 4. Stack Pointer-16 bit address register 5. Program Counter
83
84
85
Accumulator
Accumulator an 8-bit register for arithmetic/logic unit (ALU). Accumulator used to store 8-bit data and to perform arithmetic and logical operations. The result of an operation is stored in the accumulator.
86
87
Flag
Flag is a flip flop used to store the information about the status of the processor and the status of the instruction executed most recently.
88
89
90
91
Interrupts in Microprocessor
Types and Function
94
Interrupt
Interrupt is a signal sent by an external device to the processor so as to request the processor for doing a particular task or work
95
Interrupts
An emergency asynchronous signal to a Microprocessor where the external device (I/O devices) get the attention of MP when pressing a key on the keyboard or clicking a button on the mouse triggers an interrupt 2 types of Interrupts-Maskable (delayed or rejected) and Non-maskable (cannot be rejected) Also classified as Vectored-Hard wired and Non Vectored-software operated.. 8085 has 5 External Interrupts
96
97
8085 Interrupts
TRAP RST7.5 RST6.5 RST 5.5 INTR
8085
98
Software
Software interrupts are program instructions. These instructions inserted at desired locations in a program. While running a program, if software interrupt instruction is encountered then the processor executes an interrupt service routine
99
Software Interrupts
RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7
100
Hardware
If an interrupt is initiated in a processor by an appropriate signal at the interrupt pin, then the interrupt is called Hardware interrupt
101
102
105
P used in Avionics
MIP7965, 64-bit Super scaler 750MHz MIPS Microprocessor
106
MIP 7965 P
107
108
109
Assembly Language
A low Level language arrived from the Machine Language given by a manufacturer. The language in which the mnemonics (short -hand form of instructions) used to write a program is called an Assembly Language. Assembly Language given by a Manufacturer
110
Compiler
A compiler converts high level program C, C +) into machine language
111
Microprocessor Programming
1. Assembly language-a low level language converted into machine language in Assembler 2. Machine language recognized by Microprocessor = instruction of 1 & 0 3. Assembly language and machine language is proprietary 4. Compiler converts High level language(C,C+Fortan Pascal), into machine language
112
MEMORY
Major Memories, Distinction, Computer Memory,Volatile and Non Volatile memory,RAM & ROM
113
TYPES OF MEMORIES
MEMORIES
1. MAGNETIC
2,.Optical
CD DRIVE
3. SEMICONDUCTOR.
RAM
ROM
114
Memories
1. Magnetic Memories-Core Memory-Magnetic memories are nonvolatile memory. They store information permanently. They are slower than semiconductor memory. Three types: hard disks, floppy disks and tapes. 2. Semiconductor memories- two types: RAM (random access memory) and ROM (read only memory) 3. Optical memory-Back up memory-CD
115
116
Core memory
117
Core Memory
Core Memory made up of Ferrite Cores arranged in a two-dimensional grid in X & Y Wires are threaded into X & Y thru which current is applied to change from 0 to 1 Word-lines (Rows X) Bit lines (Columns-Y)
118
2.OPTICAL MEMORY-Back up
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Laser beam used to write or read an optical memory Optical memory - a back up memory Very high storage capacity. Types of optical memory are:CD-ROM, CD-R (CD Recordable), CD-RW, DVD-ROM, DVD-R and DVD-RW. CD-ROM also called compact disk ROM. Information on CDROM written at the time of manufacture. CD-ROM read-only type memory. Size of Disc 5.25 inch diameter. 650MB CD-ROMs available. Access time is 80 ms. Data transfer rate 4800KB/s. Track density 16000 tracks per inch. CD-R/W (Read/Write) of 700 MB capacity now available. A DVD-ROM is similar to CD-ROM.
119
3.Semiconductor memory-Volatile
1. Volatile memory storing information so long as power supply is on. 2. Two types of semiconductor memory: RAM (random access memory) and ROM (read only memory). 3. RAM is a read/write memory & ROM is a permanent type memory & cannot be written by User
121
3.Semiconductor memory-Volatilecontinued
3. ROM-Read only Memory: ROM contents not lost when power supply goes off. User cannot write into a ROM. ROM contents are decided by the manufacturer and written at the time of manufacture. Types of ROM are PROM, EPROM, EEPROM 4. Flash memory s electrically erasable and programmable
122
123
RAM
RAM, types SRAM, DRAM, SDRAM.
124
RAM
126
Features of RAM
Store a Data in either Static RAM (the state of a Flip Flop) or Dynamic RAM as a Charge in a capacitor (or transistor gate) A volatile memory RAM chips faster and compatible to motherboard. RAM often used to shadow Bios ROM to improve performance when executing BIOS code
127
RAM
128
Types of RAM
1. S-RAM used in Cache 2. D-RAM used main memory in computer 3. SD-RAM Synchronous D Ram used in Desktop 4. C-MOS RAM for Hard disk settings 5. SVRAM-Synchronous Video RAM used in Graphics card in Multimedia.
129
S-RAM
S RAM-Static Random Access Memory =for Computer Speed; flip-flop holding each bit of memory;32 Ambit capacity .128 =4 chips of 32 M A CMOS Transistor memory-has 3 working states, 1.Standby,2.Reading and 3.Writing SRAM-used as General Purpose Cache, SRAM caches, hard disk buffers, router buffers, etc. LCD screens and printers for holding the image D RAM-Dynamic Random Access Memory
130
Features of SRAM
Characteristics -Due to a more complex internal structure, SRAM less dense than DRAM Clock rate and power -power-hungry
131
D-RAM
132
D-RAM
Memory cells with a paired transistor and capacitor for constant refreshing DRAM mostly used in notebooks, office printers and in routers. Asynchronous D RAM( as interface), SSDRAM( in cache, in graphics adapter) and SVRAM (Buffer in Graphics)CMOS RAM ( for hard disc settings)
133
ROM
TYPES, PROM, EPROM, EEPROM
134
PROM
2
For booting
EPROM
ROM
EAPROM
EEPROM
135
137
ROM in BIOS
138
Types of ROM
1. PROM used in Programmable controllers, digital panel meters, vending machines, GPRS, Clutch brake controller 2. EPROM3. EAPROM-electrically alterable PROM 4. EEPROM
139
PROM
o PROMs (Programmable Read-Only Memory) written to (programmed) via a special device, a PROM programmer. o Writing often takes the form of permanently destroying or creating internal links (fuses or antifuses) with the result that a PROM can only be programmed once.
140
2.EPROM
o EPROM's (Erasable Programmable Read-Only Memory) be erased by exposure to ultraviolet light then rewritten via an EPROM programmer. Repeated exposure to ultraviolet light will eventually destroy the EPROM but it generally takes many (greater than 1000) exposures before the EPROM becomes unusable. EPROM's can be easily identified by the circular 'window' in the top which allows the UV light to enter. Once programmed, this window is typically covered by a label to prevent accidental erasure.
ROM).
o o
141
3.EAPROM
o EAROMs (Electrically Alterable ReadOnly Memory) be modified a bit at a time, but writing is intended to be an infrequent operation; most of the time the memory is used as a ROM.\ o EAROM may be used to store critical system setup information in a nonvolatile way. o For many applications, EAROM has been supplanted by CMOS RAM backed-up by a lithium battery.
142
4.EEPROM
o EEPROM such as Flash memory (Electrically Erasable Programmable Read-Only Memory) allow the entire ROM (or selected banks of the ROM) to be electrically erased (flashed back to zero) then written to without taking them out of the computer (camera, MP3 player, etc.). o Flashing is much slower (milliseconds) than writing to RAM (nanoseconds) (or reading from any
143
Flash memory
Flash memory- a compromise between RAM-type memories and ROM memories Flash memory possess the non-volatility of ROM memories while providing both read and write access However, the access times of flash memories longer than the access times of RAM
144