next presentation: memory, alu, and control circuitry

44
11010 10110 10100 10111 10000 01011 10111 11011 10110 11010 11000 00010 11011 11000 10000 00000 00000 01110 00101 00000 10000 00000 FETCH CIRCUITRY INCREM ENTOR EXECUTE CIRCUITRY ARITHM ETIC & LOGIC UNIT (ALU) A D D R E S S D E C O D E R CLOCK ACCUM ULATOR OPCODE OPERAND ADDRESS JUM P ADDRESS INSTRUCTION REGISTERS PROGRAM COUNTER LOAD PROGRAM INSTRUCTION COUNTER REGISTERS EXECUTE CONTROL OPCODE IN ACCUM ULATOR INSTRUCTION REGISTER CONTROL CONTROL ALU CONTROL M EM OPCODE IN LO AD cents JLT nickel D one: SUB nickel STOR cents LO AD count INC STOR count JM P Again: HALT 14 5 0 JM P Again: # copy the value at‘cents’ to the Accum ulator # ifthe value at‘nickel’ is less than the Accum ulatorthen # jum p to the address ‘D one:’ # subtractthe value at‘nickel’ from the Accum ulator # and putthe resultback into the Accum ulator # copy the value in the Accum ulatorto ‘cents’ # copy the value ataddress ‘count’ to the Accum ulator # add 1 to the Accum ulator # copy the value in the Accum ulatorto ‘count’ # unconditional jum p to the address ‘Again:’ # stop the processor– end ofprogram # variable --the nam e ‘cents’ is the address and 14 is the value # variable --the nam e ‘cents’ is the address and 5 is the value # variable --the nam e ‘count’ is the address and 0 is the value # unconditional jum p to the address ‘Again:’ Assem bly Language Addresses: Program : Explanation Again: D one: cents nickel count 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F H ex Before start

Upload: jafari

Post on 10-Jan-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Next Presentation: Memory, ALU, and Control Circuitry. End of Presentation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 2: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 3: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 4: Next Presentation:  Memory, ALU, and Control Circuitry

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:

Page 5: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 6: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 7: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 8: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 9: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 10: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 11: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 12: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 13: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 14: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 15: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 16: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 17: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 18: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 19: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 20: Next Presentation:  Memory, ALU, and Control Circuitry

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:

Page 21: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 22: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 23: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 24: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 25: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 26: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 27: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 28: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 29: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 30: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 31: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 32: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 33: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 34: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 35: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 36: Next Presentation:  Memory, ALU, and Control Circuitry

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:

Page 37: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 38: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 39: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 40: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 41: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 42: Next Presentation:  Memory, ALU, and Control Circuitry

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

Page 43: Next Presentation:  Memory, ALU, and Control Circuitry

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”

Page 44: Next Presentation:  Memory, ALU, and Control Circuitry

Next Presentation: Memory, ALU, and Control Circuitry

End of Presentation