Add 5 to ACC Add 5 to the value stored in the Accumulator Stop Stop Executing

Add 5 to acc add 5 to the value stored in the

This preview shows page 9 - 13 out of 15 pages.

Add 5 to ACC ; Add 5 to the value stored in the Accumulator. Stop ; Stop Executing new instructions. In memory the program will look similar to what is shown below. Address Contents Comments 0 0 The ‘Load ACC’ Opcode 1 3 The number ‘3’ to be loaded into the Accumulator 2 1 The ‘Add to ACC’ Opcode. 3 5 The number 5 to be added to the Accumulator 4 2 The ‘stop’ Opcode This program added the number 3 and 5 and stored the result in the accumulator. We reset our microprocessor after this operation using the Reset line. This program is executed perfectly by the microprocessor. Task 5-9: Add the ‘XOR’, ‘Zero’, ‘Subtract’, and ‘Store Acc’ Instructions. FIRST we add the ‘XOR’ Instructions in to our PROM Description Instructions XOR Opcode 3 Pres.State 00 01 02 03 Pin Number
Image of page 9

Subscribe to view the full document.

NextStateBits Load IR Write Read ACC to DataBus Load ACC Load MAR Use PC /~A_Only /~Invert Logic/~Arith X X X X 1-0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 01 1 0 00 0 0 00 0 0 00 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 X X X 1 1 1 1 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0 0 0 Hex Equivalent 0115 0F50 0000 0000 Testing: I like to XOR number 5 and 4 Shown below are the Address and contents of the Rom. Also we see the corresponding functions performed by the Prom. Address Contents Comments 0 0 ;The ‘Load ACC’ Opcode 1 4 ;The number ‘4’ to be loaded in to theAccumulator 2 3 ; The ‘XOR’ Opcode 3 5 ;The number 5 to be XORed to the Accumulator 4 2 ;The ‘Stop’ Opcode As we see if we XOR 4 and 5 bit by bit we should get the result 1. This function takes four clock pulses to finish the task. SECOND: In this task we will subtract accumulator from itself and store the result(0) back in to the accumulator.
Image of page 10
In this task I like to load 6 to Accumulator and subtract it from itself. Description Instructions ZERO Opcode 4 Pres.State 00 01 02 03 Pin Number NextStateBits Load IR Write Read ACC to DataBus Load ACC Load MAR Use PC /~A_Only /~Invert Logic/~Arith X X X X 1-0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 01 1 0 00 0 0 00 0 0 00 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 X X X 1 1 0 0 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0 0 0 Hex Equivalent 0115 0360 0000 0000 Shown below are the Address and contents of the Rom. Also we see the corresponding functions performed by the Prom. Address Contents Comments 0 0 ;The ‘Load ACC’ Opcode 1 6 ;The number ‘6’ to be loaded in to theAccumulator 2 4 ; The ‘ZERO’ Opcode
Image of page 11

Subscribe to view the full document.

It takes four clock pulses to accomplish the function. THIRD: In this task I like to perform the subtraction function of 7 and 3. Description Instructions Subtract Opcode 5 Pres.State 00 01 02 03 Pin Number NextStateBits Load IR Write Read ACC to DataBus Load ACC Load MAR Use PC /~A_Only /~Invert Logic/~Arith X X X X 1-0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 01 1 0 00 0 0 00 0 0 00 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 X X X 1 1 0 0 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0 0 0 Hex Equivalent 0115 0350 0000 0000 Shown below are the Address and contents of the Rom. Also we see the corresponding functions performed by the Prom.
Image of page 12
Image of page 13
  • Spring '18

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes