[Solved] ECS154A-Homework 2

$25

File Name: ECS154A_Homework_2.zip
File Size: 169.56 KB

SKU: [Solved] ECS154A-Homework 2 Category: Tag:
5/5 - (1 vote)

Problem 1: adder4.circ

Implement a 4-bit prefix adder. The adder you implement must be a prefix adder. If you implement any other adder, such as a ripple carry adder, you will not receive any points. The automated checking cannot tell the difference between adders so the TAs will look at your submission after the due date to validate that you implemented the correct type of adder. Again, if you did not, you will not receive any credit for this problem.

It should go without saying that you cannot use the builtin adder for this problem not only because it would defeat the purpose of this problem but also because it isnt one of the generally allowed components.

Inputs

Pin Size (in bits) Explanation
Ain 4 The A in A + B
Bin 4 The B in A + B
Cinin 1 The incoming carry bit

Outputs

Pin Size (in bits) Explanation
Sum_Out 4 The sum of A + B
Carry_Out 1 The carry coming out of the most significant bit from doing A + B

Problem 2: shifter.circ

Build a circuit that can logical/arithmetic left/right shift a value a variable amount.

Additional Components

For this problem and this problem only, you can also use

  • Muxes

Inputs

Pin Size (in bits) Explanation
IsRightShiftIn 1 If 0 do a left shift. If 1 do a right shift.
IsArithmeticIn 1 If 0 do a logical shift. If 1 do an arithmetic shift
ShiftAmountIn 2 How much to shift NumberIn by
NumberIn 3 The bit string to shift

Outputs

Pin Size (in bits) Explanation
ShiftedNumberOut 3 The result of the shift performed on NumberIn

Hints

  1. Dont focus heavily on Kmaps for this problem. An easier solution can be found by thinking of this problem at a higher level
  2. Focus on each bit of the output one by one when trying to find an answer to this problem
  3. Treat the multi-bit inputs as a bunch of bits instead of as numbers
  4. Use muxes to solve this problem

Problem 3: bitcounter.circ

Create a circuit that counts the number of 1s or 0s in an 8 bit bit string.

Additional Components

For this problem and this problem only, you can also use

  • All of the components under Plexers
  • All of the components under Arithmetic except for Bit Adder

Inputs

Pin Size (in bits) Explanation
BitsIn 8 The bit string whose 1s or 0s your circuit is to count
CountZerosIn 1 If 0 count the number of 1s in BitsIn. If 1 count the number of 0s in BitsIn

Outputs

Pin Size (in bits) Explanation
BitCountOut 4 The number of 1s/0s in BitsIn

Credit

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ECS154A-Homework 2[Solved] ECS154A-Homework 2
$25