0% found this document useful (0 votes)
8 views

Chapter 7 Microprocessor

Chapter 7 discusses microprocessors and number systems, focusing on binary signals as the primary form of digital signals used in computers. It covers various number systems including decimal, binary, octal, and hexadecimal, and explains conversions between these systems. Additionally, it introduces Boolean algebra and logic gates, which are fundamental to computer logic design.

Uploaded by

Biniam Bihonegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Chapter 7 Microprocessor

Chapter 7 discusses microprocessors and number systems, focusing on binary signals as the primary form of digital signals used in computers. It covers various number systems including decimal, binary, octal, and hexadecimal, and explains conversions between these systems. Additionally, it introduces Boolean algebra and logic gates, which are fundamental to computer logic design.

Uploaded by

Biniam Bihonegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 106

Chapter 7

Microprocessor
Number Systems

• Digital systems are concerned with digital signals


• Digital signals can take many forms
• Here we will concentrate on binary signals since these are the most common
form of digital signals
• can be used individually
• perhaps to represent a single binary quantity or the state of a single
switch
• can be used in combination
• to represent more complex quantities
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”

A simple binary arrangement


Common Number Systems

Hexa-
Decimal Binary Octal decimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
p. 33
Common Number Systems

Hexa-
Decimal Binary Octal decimal
8 1000 10 8
9 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
Common Number Systems

Hexa-
Decimal Binary Octal decimal
16 10000 20 10
17 10001 21 11
18 10010 22 12
19 10011 23 13
20 10100 24 14
21 10101 25 15
22 10110 26 16
23 10111 27 17
Positional Notation: Base 10

43 = 4 x 101 + 3 x 100
10’s 1’s
place place

Place 101 100

Value 10 1

Evalua 4 x 10 3 x1
te

Sum 40 3
Positional Notation: Octal

6248 = 40410

64’s place 8’s place 1’s


place

Place 82 81 80

Value 64 8 1

Evalua 6 x 64 2x8 4x1


te
Sum
384 16 4
for
Base
10
Unsigned Binary Numbers

• For a computer with the word size of 32-bit

- 4 data-bit unit – nibble (half byte)


- 8 data-bit unit - byte
- 16 data-bit unit – two bytes (half-word)
- 32 data-bit unit – word (four bytes)
- 64 data-bit unit – double-word
Powers of 2:
20 =1 24 =16 28 =256
21 =2 25 =32 29 =512
22 =4 26 =64 210 =1024
23 =8 27 =128

210 : K (kilo ); 2 20 : M (mega); 230 : G ( giga )

9
Converting Binary to Decimal

• For example, here is 1101.01 in binary:

1 1 0 1 . 0 1 Bits
23 22 21 20 2-1 2-2 Weights (in base 10)

(1 x 23) + (1 x 22) + (0 x 21) + (1 x 20) + (0 x 2-1) + (1 x 2-2) =

8 + 4 + 0 + 1 + 0 + 0.25 = 13.25

(1101.01)2 = (13.25)10

10
Converting Decimal to Binary

• To convert a decimal integer into binary, keep dividing by 2 until the quotient is
0. Collect the remainders in reverse order
• To convert a fraction, keep multiplying the fractional part by 2 until it becomes 0.
Collect the integer parts in forward order
• Example: 162.375:
• So, (162.375)10 = (10100010.011)2

162 / 2 = 81 rem 0 0.375 x 2 = 0.750


81 / 2 = 40 rem 1 0.750 x 2 = 1.500
40 / 2 = 20 rem 0 0.500 x 2 = 1.000
20 / 2 = 10 rem 0
10 / 2 =5 rem 0
5/2 =2 rem 1
2/2 =1 rem 0
1/2 =0 rem 1
11
Why does this work?

• This works for converting from decimal to any base


• Why? Think about converting 162.375 from decimal to decimal

162 / 10 = 16 rem 2 0.375 x 10 = 3.750


16 / 10 = 1 rem 6 0.750 x 10 = 7.500
1 / 10 = 0 rem 1 0.500 x 10 = 5.000
• Each division strips off the rightmost digit (the remainder). The
quotient represents the remaining digits in the number
• Similarly, to convert fractions, each multiplication strips off the
leftmost digit (the integer part). The fraction represents the
remaining digits

12
Octal and Hexadecimal Numbers
• The octal number system: Base-8
• Eight digits: 0,1,2,3,4,5,6,7

(127.4)8 182  2 81  7 80  4 8 1 (87.5)10


• The hexadecimal number system: Base-16
• Sixteen digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
• For our purposes, base-8 and base-16 are most useful as a “shorthand” notation
for binary numbers

( B 65 F )16 11 163  6 16 2  5 161  15 16  0 ( 46687)10

13
Numbers with Different Bases

Decimal Binary Octal Hex


0 0000 0 0
1 0001 1 1
2 0010 2 2
You can convert between base-10
3 0011 3 3
base-8 and base-16 using techniques
4 0100 4 4
5 0101 5 5 like the ones we just showed for
6 0110 6 6 converting between decimal and
7 0111 7 7 binary
8 1000 10 8
9 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
14
Binary and Octal Conversions
• Converting from octal to binary: Replace each octal digit with its equivalent 3-bit
binary sequence

(673.12)8 = 6 7 3 . 1 2
= 110 111 011 . 001 010
= (110111011 .001010) 2
• Converting from binary to octal: Make groups of 3 bits, starting from the binary
point. Add 0s to the ends of the number if needed. Convert each bit group to its
corresponding octal digit.

10110100.0010112 = 010 110 100 . 001 0112


= 2 6 4 . 1 38
Octal Binary Octal Binary
0 000 4 100
1 001 5 101
2 010 6 110
3 011 7 111 15
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
Quick Exercise

2510 = 110012 = 318 = 1916


Base
Exercise – Convert ...
Hexa-
Decim Binary Octal decimal
al
33
1110101
703
1AF
Don’t use a calculator!
Exercise – Convert …
Answer

Hexa-
Decim Binary Octal decimal
al
33 100001 41 21
117 1110101 165 75
451 1110000 703 1C3
11
431 1101011 657 1AF
11
Exercise – Convert ...
Hexa-
Decimal Binary Octal decimal
29.8
101.1101
3.07
C.82
Don’t use a calculator!
Exercise – Convert …
Answer

Hexa-
Decimal Binary Octal decimal
29.8 11101.11001 35.63 1D.CC…
1… …
5.8125 101.1101 5.64 5.D
3.109375 11.000111 3.07 3.1C
12.50781 1100.100000 14.40 C.82
25 10 4
Exercise

1110
10101 x 1011
21 1110
+ 11001 + 1110
25 0000
101110 1110
46 10011010
Boolean Algebra

• Rules that govern constants and variables that can take on 2 values

• True/false; on/off; yes/no; 0/1

• Boolean logic

• Rules for handling Boolean constants and variables

• 3 fundamental operations:
AND, OR and NOT

• Truth Table: specifies results for all possible input combinations


Boolean Algebra

• Boolean algebra: basis for computer logic design

• Transistors: means for implementing Boolean algebra


• Switches: on/off to represent the 0’s and 1’s of binary digital circuits
• Combined to form logic gates

• Truth table:
• Represents relationship between a Boolean function and its binary variables.
• It enumerates all possible combinations of arguments and the corresponding
function values.

• Logic diagram: Composed of graphic symbols for logic gates. A simple circuit
sketch that represents inputs and outputs of Boolean functions.
Basic Logic Gates

• Logic gates are the basic building blocks for digital electronic circuits
• NOT, AND, and OR Gates
• NAND and NOR Gates
• Exclusive-OR (XOR) Gate
The AND gate
The OR gate
The NOT gate (or inverter)
The NAND gate
The NOR gate
The Exclusive OR gate
The Exclusive NOR gate
Boolean Algebra

• Boolean Constants
• these are ‘0’ (false) and ‘1’ (true)
• Boolean Variables
• variables that can only take the vales ‘0’ or ‘1’
• Boolean Functions
• each of the logic functions (such as AND, OR and NOT) are represented
by symbols as described above
• Boolean Theorems
• a set of identities and laws
Boolean identities

AND Function OR Function NOT function


00=0 0+0=0
01=0 0+1=1 0 1
10=0 1+0=1 1 0
11=1 1+1=1 A A
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A
A  A 0 A  A 1
Boolean laws

Commutative law Absorption law


AB BA A  AB A
A  B B  A A( A  B ) A

Distributive law De Morgan’s law


A(B  C ) AB  BC A  B A  B
A  BC ( A  B )( A  C ) A  B A  B

Associative law Note also


A(BC ) ( AB )C A  AB A  B
A  (B  C ) ( A  B )  C A( A  B ) AB
Combinational Logic

• Digital systems may be divided into two broad categories:


• combinational logic
• where the outputs are determined solely by the current states of the
inputs
• sequential logic
• where the outputs are determined not only by the current inputs but
also by the sequence of inputs that led to the current state
Combinational Logic

• Implementing a function from a Boolean expression


Example

X A  BC
Combinational Logic

• Implementing a function from a Boolean expression


Example –

Y AB CD
Combinational Logic

• Generating a Boolean expression from a logic diagram


Example –
Combinational Logic

Example (continued)
– work progressively from the inputs to the output adding logic expressions to
the output of each gate in turn
Combinational Logic

• Implementing a logic function from a description


Example –
The operation of the Exclusive OR gate can be stated as:
“The output should be true if either of its inputs are true,
but not if both inputs are true.”
This can be rephrased as:
“The output is true if A OR B is true,
AND if A AND B are NOT true.”
We can write this in Boolean notation as

X ( A  B)  ( AB )
Combinational Logic

Example (continued)
The logic function can then be implemented as before

X ( A  B)  ( AB )
Implementing a logic function from a truth
table

Example –
Implement the function of the following truth table

A B C X – first write down a Boolean expression


0 0 0 0 for the output
0 0 1 1 – then implement as before
0 1 0 0 – in this case
0 1 1 0
1 0 0 0
X A B C  A B C  A B C
1 0 1 1
1 1 0 1
1 1 1 0
Implementing a logic function from a truth
table

Example (continued)
The logic function
can then be implemented as before X  A B C  A B C  A B C
Implementing a logic function from a truth
table
• In some cases it is possible to simplify logic expressions using the rules of
Boolean algebra
Example –
hence the following circuits are equivalent

X  ABC  A BC  AC  A C X BC  A
Function Minimization using Boolean Algebra

• Examples:

(a) a + ab = a(1+b)=a

(b) a(a + b) = a.a +ab=a+ab=a(1+b)=a.

(c) a + a'b = (a + a')(a + b)=1(a + b) =a+b

(d) a(a' + b) = a. a' +ab=0+ab=ab


The other type of question

Show that;
1- ab + ab' = a
2- (a + b)(a + b') = a

1- ab + ab' = a(b+b') = a.1=a


2- (a + b)(a + b') = a.a +a.b' +a.b+b.b'
= a + a.b' +a.b + 0
= a + a.(b' +b) + 0
= a + a.1 + 0
= a +a=a
More Examples

• Show that;
(a) ab + ab'c = ab + ac
(b) (a + b)(a + b' + c) = a + bc

(a) ab + ab'c = a(b + b'c)


= a((b+b').(b+c))=a(b+c)=ab+ac

(b) (a + b)(a + b' + c)


= (a.a + a.b' + a.c + ab +b.b' +bc)
=…
DE Morgan's example
Show that: (a(b + z(x + a')))' =a' + b' (z' + x')

(a(b + z(x + a')))' = a' + (b + z(x + a'))'


= a' + b' (z(x + a'))'

= a' + b' (z' + (x + a')')


= a' + b' (z' + x'(a')')

= a' + b' (z' + x'a)


=a‘+b' z' + b'x'a
=(a‘+ b'x'a) + b' z'
=(a‘+ b'x‘)(a +a‘) + b' z'
= a‘+ b'x‘+ b' z‘
= a' + b' (z' + x')
Exercises using Theorems
Simplify the Boolean functions:
1. ab’(ab’+b’c)
2. y’(x+y+z)
3. (w’+x’+y’+z’)(w’+x’+y’+z)(w’+x’+y+z’) (w’+x’+y+z)
4. wy’+wx’y+wxyz+wxz’
5. {a(b+c)+a’b}’
6. abc+a’d+b’d+cd
7. Write switching function of full adder and simplify
algebraically.
More Exercises

8. AD’+A’B’+C’D+A’C’+B’D = AD’+(BC)’

9. XY’+Z(X’+Y+W)=Z+XY’

10. X’Z’+YZ+XY’=Y’Z’+X’Y+XZ

11. X’Y’Z’+XYZ+
(WZ’)’+X’YZ’+W’XY+XY’Z’=W’XY+XYZ+X’Z’+Y’Z’
What are Karnaugh maps?

• Karnaugh maps provide an alternative way of simplifying logic circuits.

• Instead of using Boolean algebra simplification techniques, you can transfer


logic values from a Boolean statement or a truth table into a Karnaugh map.

• The arrangement of 0's and 1's within the map helps you to visualize the logic
relationships between the variables and leads directly to a simplified Boolean
statement.
Karnaugh maps

• Karnaugh maps, or K-maps, are often used to simplify logic problems


with 2, 3 or 4 variables.

Cell = 2n ,where n is a number of variables

For the case of 2 variables, we form a map consisting of 2 2=4 cells


as shown in Figure

A A A
0 1 0 1 0 1
B B B
0 AB A  B 0
00 10 0 AB AB
0 2
01 11
1 AB A B 1
1 3
1
A B AB
Maxterm Minterm
Karnaugh maps

• 3 variables Karnaugh map

Cell = 23=8

AB
C 00 01 11 10
0 2 6 4
0 ABC A BC ABC AB C
1 3 7 5
1 A B C A BC ABC AB C
Karnaugh maps

• 4 variables Karnaugh map

AB
CD 00 01 11 10
0 4 12 8
00
1 5 13 9
01
3 7 15 11
11

2 6 14 10
10
Karnaugh maps

• The Karnaugh map is completed by entering a '1‘(or ‘0’) in each of the


appropriate cells.
• Within the map, adjacent cells containing 1's (or 0’s) are grouped together
in twos, fours, or eights.
Example

2-variable Karnaugh maps are trivial but can be used to introduce


the methods you need to learn. The map for a 2-input OR gate
looks like this:

A
0 1
B
A

B
Y 0 1
A
1 1 1
A B Y
0 0 0
0 1 1
B
1 0 1
1 1 1
A+B
Example

AC
A B C Y
0 0 0 1 AB
0 0 1 1 C 00 01 11 10
0 1 0 0 0 1 1 1
0 1 1 0
1 0 0 1 1 1 1
1 0 1 1
1 1 0 1
1 1 1 0 B
B  AC
Exercise

Given the truth table, find the simplified form.

A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
A circuit for two light switches

• F(x,y)=1 when the light is on


• F(x,y)=0 when the light is off
• When both switches are closed, the light is on:
F(1,1)=1, this implies
• When we open one switch, the light is off:
F(1,0)=F(0,1)=0
• When the other switch is also open, the light is on:
F(0,0)=1

63
Thus, we get:

x y F(x, Which Boolean expression is given by F?


y)
1 1 1
1 0 0 F(x,y) = xy + x'y'

0 1 0
0 0 1

Draw a circuit for F,


i.e., a circuit to control two light switches.

64
Application of Logic gates

• Digital Comparator

• Code converter

• Arithmetic

• Encoding and Decoding

• Data Selection

• Storage

• Counting
Comparison

• A basic comparator compares two quantities and indicates whether or


not they are equal.
• Think about conditional statement like if or things like that in programming.
Arithmetic
• Adder is the key-element circuit of binary arithmetic.
• You can add (of course, it’s the adder).
• You can subtract using adder with special treatment on input number.
• You can multiply using adder with the help of other circuits.
• You can also divide with series of circuits in conjunction of adder.
Code Conversion

• A code converter changes one form of coded information into another


coded form, i.e.:
• binary-to-BCD
• binary-to-Gray code
• etc.
Encoding and Decoding

• Encoder converts information, such as a decimal number or an


alphabetic character, into some coded form.
• Decoder does the opposite.
Data Selection

• Multiplexer (MUX)
• Switches digital data from several input lines on a single output line in a special
time sequence.
• Demultiplexer (DEMUX)
• Does the opposite.
Storage
• This function is required in most digital systems.
• It can memorize a bit of a group of bits and retain the information as
long as necessary.
• Flip-flops
• Registers
• etc
Counting
• Counting is one of the most important function in digital systems.
• Think about the loop in programming, you cannot accomplish unless you have
some sort of counter.
• To count, the counter must remember the present numbers  it can go to
the next proper number in sequence.
Sequential Logic
• Simply computing functions usually not enough
• Want more time-varying behavior
• Common model: combinational logic with state-holding elements

Inputs Combinationa Outputs


l logic

Clock
Input
State-holding elements
State Machines
• Common use of state-holding elements
• Idea: machine may go to a new state in each cycle
• Output and next state dependent on present state
• E.g., a four-counter

C’ / 0 C’ / 1
C/1

C/2
C/0

C’ / 3 C/3 C’ / 2
Latches & Flip-Flops
• Two common types of state-holding elements
• Latch
• Level-sensitive
• Transparent when clock is high
• Holds last value when clock is low
• Cheap to implement
• Somewhat unwieldy to design with
• Flip-flop
• Edge-sensitive
• Always holds value
• New value sampled when clock transitions from 0 to 1
• More costly to implement
• Much easier to design with
Latches & Flip-Flops
• Timing diagrams for the two common types:

D Q
Latch
Clk

Clk

D Q
Flip-
Flop
RAMs
• Another type of state-holding element
• Addressable memory
• Good for storing data like a von Neumann program

Data In Data Out

Address

Read
Write
Setup & Hold Times
• Flip-flops and latches have two types of timing requirements:
• Setup time
• D input must be stable some time before the clock arrives
• Hold time
• D input must remain stable some time after the clock has arrived
Setup & Hold Times
• For a flip-flop (edge-sensitive)

Setup time: Hold time:


D must not D must not
change here change here

Clk
Synchronous System Timing

• Budgeting time in a typical synchronous design

Clock period

Clock
Clock
skew
skew Slowest logical
path
Clk to D delay Setup Time
What is a Microprocessor?

• The word comes from the combination micro and processor.


• Processor means a device that processes whatever. In this context
processor means a device that processes numbers, specifically binary
numbers, 0’s and 1’s.
• To process means to manipulate. It is a general term that describes all manipulation. Again in
this content, it means to perform certain operations on the numbers that depend on the
microprocessor’s design.
Definition of the Microprocessor

• The microprocessor is a programmable device that takes in numbers,


performs on them arithmetic or logical operations according to the
program stored in memory and then produces other numbers as a
result.
Cont’d
• The microprocessor is one of the most important components of a digital
computer.
• It acts as the brain of the computer system.
• As technology has progressed, microprocessors have become faster,
smaller and capable of doing more work per clock cycle.
• Sometimes, microprocessor is written as µP.
• ( µ is pronounced as Mu )
• Programmable device: The microprocessor can perform different sets of
operations on the data it receives depending on the sequence of instructions
supplied in the given program.
• By changing the program, the microprocessor manipulates the data in
different ways.
• Instructions: Each microprocessor is designed to execute a specific group of
operations. This group of operations is called an instruction set. This
instruction set defines what the microprocessor can and cannot do.
• Takes in: The data that the microprocessor manipulates must come from
somewhere.
• It comes from what is called “input devices”.
• These are devices that bring data into the system from the outside
world.
• These represent devices such as a keyboard, a mouse, switches, and
the like.
• Numbers: The microprocessor has a very narrow view on life. It only
understands binary numbers.
• A binary digit is called a bit (which comes from binary digit).
• The microprocessor recognizes and processes a group of bits together. This
group of bits is called a “word”.
• The number of bits in a Microprocessor’s word, is a measure of its
“abilities”.
• Words, Bytes, etc.
• The earliest microprocessor (the Intel 8088 and Motorola’s 6800)
recognized 8-bit words.
• They processed information 8-bits at a time. That’s why they are called “8-
bit processors”. They can handle large numbers, but in order to process
these numbers, they broke them into 8-bit pieces and processed each
group of 8-bits separately.
• Later microprocessors (8086 and 68000) were designed with 16-bit words.
• A group of 8-bits were referred to as a “half-word” or “byte”.
• A group of 4 bits is called a “nibble”.
• Also, 32 bit groups were given the name “long word”.
• Today, all processors manipulate at least 32 bits at a time and there exists
microprocessors that can process 64, 80, 128 bits
• Arithmetic and Logic Operations:
• Every microprocessor has arithmetic operations such as add and
subtract as part of its instruction set.
• Most microprocessors will have operations such as multiply and divide.
• Some of the newer ones will have complex operations such as square
root.
• In addition, microprocessors have logic operations as well.
• Such as AND, OR, XOR, shift left, shift right, etc.
• Again, the number and types of operations define the microprocessor’s
instruction set and depends on the specific microprocessor.
Stored in memory

• First, what is memory?


• Memory is the location where information is kept while not in current use.
• Memory is a collection of storage devices. Usually, each storage device
holds one bit. Also, in most kinds of memory, these storage devices are
grouped into groups of 8.
• These 8 storage locations can only be accessed together. So, one can only
read or write in terms of bytes to and form memory.
• Memory is usually measured by the number of bytes it can hold.
• It is measured in Kilos, Megas and lately Gigas. A Kilo in computer language
is 210 =1024. So, a KB (KiloByte) is 1024 bytes. Mega is 1024 Kilos and Giga
is 1024 Mega.
Stored in memory
• When a program is entered into a computer, it is stored in memory. Then
as the microprocessor starts to execute the instructions, it brings the
instructions from memory one at a time.
• Memory is also used to hold the data.
• The microprocessor reads (brings in) the data from memory when it
needs it and writes (stores) the results into memory when it is done.
• Produces: For the user to see the result of the execution of the program,
the results must be presented in a human readable form.
• The results must be presented on an output device.
• This can be the monitor, a paper from the printer, a simple LED or many
other forms.
A Microprocessor-based system
• From the above description, we can draw the following block diagram to
represent a microprocessor-based system:
Inside The Microprocessor
• Internally, the microprocessor is made up of 3 main units.
– The Arithmetic/Logic Unit (ALU)
– The Control Unit.
– An array of registers for holding data while it is being manipulated.
Organization of a microprocessor-based system

• Let’s expand the picture a bit.


Memory
• To execute a program:
• The user enters its instructions in binary format into the memory.
• The microprocessor then reads these instructions and whatever data is
needed from memory, executes the instructions and places the results
either in memory or produces it on an output device.
The three cycle instruction execution model
• To execute a program, the microprocessor “reads” each instruction from
memory, “interprets” it, then “executes” it.
• To use the right names for the cycles:
– The microprocessor fetches each instruction,
– decodes it,
– Then executes it.
• This sequence is continued until all instructions are performed.
Machine Language
• The number of bits that form the “word” of a microprocessor is fixed for
that particular processor.
• These bits define a maximum number of combinations.
• For example an 8-bit microprocessor can have at most = 256 different
combinations.
• However, in most microprocessors, not all of these combinations are used.
• Certain patterns are chosen and assigned specific meanings.
• Each of these patterns forms an instruction for the microprocessor.
• The complete set of patterns makes up the microprocessor’s machine
language.
Types of System Buses
• Data Bus
• Address Bus
• Control Bus
Data Bus
• A collection of wires through which data is transmitted from one part of a
computer to another is called Data Bus.
• Data Bus can be thought of as a highway on which data travels within a
computer.
• This bus connects all the computer components to the CPU and main
memory.
Cont’d

• The size (width) of bus determines how much data can be transmitted at
one time.
• E.g.:
• A 16-bit bus can transmit 16 bits of data at a time.
• 32-bit bus can transmit 32 bits at a time.
Address Bus
• A collection of wires used to identify particular location in main memory
is called Address Bus.
• Or in other words, the information used to describe the memory
locations travels along the address bus.
Cont’d
• The size of address bus determines how many unique memory locations
can be addressed.
• E.g.:
• A system with 4-bit address bus can address 24 = 16 Bytes of memory.
• A system with 16-bit address bus can address 216 = 64 KB of memory.
• A system with 20-bit address bus can address 220 = 1 MB of memory.
Control Bus
• The connections that carry control information between the CPU and
other devices within the computer is called Control Bus.
• The control bus carries signals that report the status of various devices.
• E.g.:
• This bus is used to indicate whether the CPU is reading from memory or
writing to memory.

You might also like