next presentation: memory, alu, and control circuitry
DESCRIPTION
Next Presentation: Memory, ALU, and Control Circuitry. End of Presentation. - PowerPoint PPT PresentationTRANSCRIPT
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
Before start
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
11110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clock 0Boot: 1E
put in Program Counter
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
11111
10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks1 to 3Fetch
1E & 1F
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00000
10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks4 to 5
Execute,JMP
Again:
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00000
11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 6 to 8Fetch
00 & 01
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00001
01110 11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks9 to 10Execute
LOADcents
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00100
01110 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks11 to 16
Fetch02, 03, 04
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00100
01110 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks17 to 18Execute
JLTnickel
14 < 5this is false so
no further action is done
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00110
01110 01011 10111
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 19 to 22
Fetch05 & 06
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
00110
01001 01011 10111
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks23 to 25Execute
SUBNickel
14 - 5equals 9
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
011100010100000
1000000000
01000
01001 11011 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
1450
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 26 to 29
Fetch07 & 08
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01000
01001 11011 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks30 to 31Execute
STORcents
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01010
01001 11010 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 32 to 35
Fetch09 & 0A
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01010
00000 11010 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks36 to 37Execute
LOADcount
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01011
00000 00010
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks38 to 39Fetch 0B
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01011
00001 00010
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks40 to 42Execute
INC
0 + 1equals 1
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100000
1000000000
01101
00001 11011 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
950
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 43 to 46
Fetch0C & 0D
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
01101
00001 11011 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks47 to 48Execute
STORcount
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
01111
00001 10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks49 to 52
Fetch 0E & 0F
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00000
00001 10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks53 to 54Execute,
JMPAgain:
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00001
00001 11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 55 to 57
Fetch00 & 01
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00001
01001 11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks58 to 59Execute
LOADcents
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00100
01001 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks60 to 85
Fetch02, 03, 04
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00100
01001 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks66 to 67Execute
JLTnickel
9 < 5this is false so
no further action is done
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00110
01001 01011 10111
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 68 to 71
Fetch05 & 06
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
00110
00100 01011 10111
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks72 to 74Execute
SUBNickel
9 - 5equals 4
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
010010010100001
1000000000
01000
00100 11011 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
951
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 75 to 78
Fetch07 & 08
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01000
00100 11011 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks79 to 80Execute
STORcents
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01010
00100 11010 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 81 to 84
Fetch09 & 0A
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01010
00001 11010 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks85 to 86Execute
LOADcount
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01011
00001 00010
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks87 to 88Fetch 0B
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01011
00010 00010
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks89 to 91Execute
INC
0 + 1equals 1
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100001
1000000000
01101
00010 11011 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
451
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks 92 to 95
Fetch0C & 0D
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
01101
00010 11011 11000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks96 to 97Execute
STORcount
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
01111
00010 10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks98 to 101
Fetch 0E & 0F
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
00000
00010 10000 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks102 to 103
ExecuteJMP
Again:
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
00001
00010 11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks104 to 106
Fetch00 & 01
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
00001
00100 11010 10110
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks107 to 108
ExecuteLOADcents
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
00100
00100 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks109 to 114
Fetch02, 03, 04
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
10000
00100 10100 10111 10000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clocks115 to 117
ExecuteJLT
nickel
4 < 5this is true so
JMP is executed
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
10000
00100 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clock 118Fetch 10
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
10000
00100 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘cents’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clock 119Execute
HALT
1101010110101001011110000010111011111011101101101011000000101101111000100000000000000
001000010100010
1000000000
10000
00100 00000
FETCH CIRCUITRY
INCREMENTOR
EXECUTE CIRCUITRY
ARITHMETIC &LOGIC UNIT
(ALU)
ADDRESS
DECODER
CLOCK
ACCUMULATOR
OPCODE OPERANDADDRESS
JUMPADDRESS
INSTRUCTION REGISTERS
PROGRAM COUNTER
LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL
OPCODE IN
ACCUMULATORINSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL MEM
OPCODE IN
LOADcentsJLTnickelDone:SUBnickelSTORcentsLOADcountINCSTORcountJMPAgain:HALT
452
JMPAgain:
# copy the value at ‘cents’ to the Accumulator
# if the value at ‘nickel’ is less than the Accumulator then# jump to the address ‘Done:’
# subtract the value at ‘nickel’ from the Accumulator# and put the result back into the Accumulator# copy the value in the Accumulator to ‘cents’
# copy the value at address ‘count’ to the Accumulator
# add 1 to the Accumulator# copy the value in the Accumulator to ‘count’
# unconditional jump to the address ‘Again:’
# stop the processor – end of program
# variable -- the name ‘cents’ is the address and 14 is the value# variable -- the name ‘nickel’ is the address and 5 is the value# variable -- the name ‘count’ is the address and 0 is the value
# unconditional jump to the address ‘Again:’
Assembly LanguageAddresses: Program: Explanation
Again:
Done:
centsnickelcount
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Hex
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F
Clock 120 AfterHALT
HALTResults in memory
“count of 2 nickels” and“4 cents remaining”
Next Presentation: Memory, ALU, and Control Circuitry
End of Presentation