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

Lab 4 Michael Kim 3/15/18 Section: 7448

This document summarizes Michael Kim's lab report from March 15th, 2018 for section 7448 on ALUs and CPUs with RALUs. The lab report discusses adding functions like XOR and NAND to the ALU design, the number of rows needed for an 11 input RALU, how to perform operations like subtraction and division using a CPU with RALU, and problems encountered with understanding the RALU section and using the pattern generator in Waveforms. Future work proposed includes starting the lab earlier and experimenting more with the pattern generator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Lab 4 Michael Kim 3/15/18 Section: 7448

This document summarizes Michael Kim's lab report from March 15th, 2018 for section 7448 on ALUs and CPUs with RALUs. The lab report discusses adding functions like XOR and NAND to the ALU design, the number of rows needed for an 11 input RALU, how to perform operations like subtraction and division using a CPU with RALU, and problems encountered with understanding the RALU section and using the pattern generator in Waveforms. Future work proposed includes starting the lab earlier and experimenting more with the pattern generator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Lab 4

Michael Kim
3/15/18
Section: 7448
ALU

1.
1. To add F=A NAND B, four additional NOT gates would be included where the outputs F and X are
inputted to each NOT gate respectively. For the function F=A XOR B, four additional XOR gates would be
included to each XOR gate respectively. By adding these changes to the design, there would now be 8-
input MUXes as a result of there now being 6 total inputs.

2. There would be 211 rows due to there being 11 inputs.

CPU with RALU


3.

000

001
010

011
100

101
110

111
4.
a)

b)
c)

d)
e)

f)
1. To “remember” the last carry output, the carry out would be sent into a DFF.

2. To take the 2’s complement of a number loaded in Reg. A, perform the complement operation and
save the output into B. Next, perform the SUM operation of 1 and save the output into B. This will
successfully get the 2’s complement of A into B.

3. To subtract with your CPU, the number that will be subtracted must get its 2’s complement through
the same steps as in #2. Once the complement is stored into B and the first number into A, perform a
SUM operation between A and B. You must still verify your answer as a possible carry will result in a
different answer than what is expected.

4. Dividing by two will not work for all 4-bit 2’s complement numbers because a division by 2 is equal to
right shifting by one. For negative numbers in 2’s complement, this would lead to a positive result,
which is incorrect.

5. In the case where you’re not allowed to use a flip-flop that has an asynchronous CLR or SET, you can
add a function that clears the contents of either A or B by inputting a 0000 and performing an AND
operation with the values of either A or B, which will make sure that the value is cleared.
Problems Encountered

Initially, I had trouble understanding the CPU with RALU section of the lab, especially the table. After
consulting the TAs and fellow classmates, I was able to complete with chart. Also, it took me some time
to figure out the pattern generator on Waveforms.

Future Work/Applications

Given more time/ambition, I would definitely start this lab earlier, as this lab took many hours to
complete. Additionally, I would also experiment with Waveforms’ Pattern Generator and try to create
different patterns and functions using different inputs.

You might also like