Professional Documents
Culture Documents
EEAC-110-Learning-Material-2
EEAC-110-Learning-Material-2
FETCH–DECODE–EXECUTE CYCLE
a fundamental process that a microprocessor repeatedly performs each time it
runs a program
a.) FETCH
gets the instruction from memory and brings it to the instruction register
b.) DECODE
interprets the fetched instruction in the instruction register
c.) EXECUTE
implements the instruction and processes the data
FETCH–DECODE–EXECUTE PROCESS:
1.) Fetches the instruction byte from the address pointed to by the program counter
(PC) and places it in the instruction register (IR).
2.) Increments the PC by 1.
3.) Interprets the instruction byte in the IR and executes it accordingly.
4.) Repeats the process until it is instructed to stop.
OpCode
specifies the operation to be performed
the most significant bits of the instruction
the genuine instruction part of the instruction that tells the CPU what
to do
Operand
data on which the operation is performed
the least significant bits of the instruction
specifies the address or register where the data is fetched
CPU UNITS:
1.) Arithmetic-Logic Unit (ALU)
for bit operations on data held in the AC and MBR
for storing the results of operations
contains arithmetic adders, logical AND-ers and OR-ers, etc.
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
COMPUTER LANGUAGE
a structured form of communication between a programmer and the
microprocessor
LANGUAGE TRANSLATORS:
1.) ASSEMBLER
a process or a program designed to convert assembly level language programs
down to machine level
HAND ASSEMBLY
the manual process of assembly making use of a look up table of one-to-one
correspondence between a mnemonic and its equivalent machine level
equivalent
2.) COMPILER
a process or a program designed to convert high-level language programs down
to machine level
COMPUTER ARCHITECTURE
defines the physical structure by which a microprocessor is built
2.) ̅̅̅̅̅̅̅̅̅̅̅
𝑴𝑬𝑴𝑾 (Memory Write)
writes data into the memory
3.) ̅̅̅̅̅̅
𝑰𝑶𝑹 (Input Read)
accepts data from input devices
*** Z-80 control signals are not directly generated by the microprocessor.
6 ADDRESSING MODES:
LDA (HL)
c.) REGISTER INDIRECT 𝐴𝐶 ← (1800)
HL = 1800
LDA (IX)
f.) INDEXED 𝐴𝐶 ← (1800)
IX = 1800
Example:
Determine the contents of accumulator, register B, address (1800), and the data bus
after the execution of the following program. Note that all values and addresses are in
hexadecimal form.
Initial Values:
(1800) = 13
B = 14
8003 STA B 32
8004 ADD B 80
8007 RST 7 FF
PC
IR
AC
Data Bus
Address
Bus
(06)
(1800)