1 / 18

Java Programming assignment 1

Java Programming assignment 1. Cheng-Chia Chen. ToDo works. 1. Implement FA1 ( 1-bit full adder) 2. Implement FA8 ( 8-bit full adder) 3. Implement FS1 (1-bit full subtractor ) 4. Implement FS8 (b-bit full subtractor ) 5. Implement Multiplier8 ( 8-bit x 8-bit multiplication)

neena
Download Presentation

Java Programming assignment 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Programming assignment 1 Cheng-Chia Chen

  2. ToDo works 1. Implement FA1 ( 1-bit full adder) 2. Implement FA8 ( 8-bit full adder) 3. Implement FS1 (1-bit full subtractor ) 4. Implement FS8 (b-bit full subtractor ) 5. Implement Multiplier8 ( 8-bit x 8-bit multiplication) 6. Implement Divider8 (8-bit by 8-bit division + remainder)

  3. Full-Adder

  4. The Binary Adder

  5. The n-bit Ripple-Carry Adder : FAn

  6. The Binary Multiplication

  7. The Array Multiplier

  8. 0000 A0..A3 0000 A0..A3 0000 A0..A3 0000 A0..A3 B3 B0 B1 B2 FA4 FA4 FA4 DeMUX4 DeMUX4 DeMUX4 DeMUX4 Multiplier4 0 0 0 0 m7 m6 m5 m4 m1 m2 m0 m3

  9. Subtracter • Subtracter circuits take two binary numbers as input and subtract one binary number input with other binary number input. • Similar to to adders it gives out two output, difference and borrow (Carry in the case of Adder). There are two types of subtracters.   • Half Subtracter. • Full Subtracter.

  10. Half Substractor IO relations: D = X (~Y) \/ (~X) Y Bout = (~X) Y

  11. Full Subtractor • Symbol: • D = (X xor Y) xor Bin • Bout = X'.Y + X'.Bin + Y.Bin

  12. Full substrator : implementations

  13. Parallel binary n-bit substrator

  14. Divider • How division is computed ? • Ex: 101101 / 000110 = ? | 000111 |-------------- 000110|zzzzz101101 -000110-- 0001010- -000110 0001001 -000110 000011 quotient remainder

  15. A0..A3 / B1..B3 = Q0 ..Q3 -- R0 .. R3 1. T0 = zzzA0 2. if (T0 < B) => Q0 = 0; T1 = T0 A1; else => Q0 = 1; T1 = (T0-B) A1 ; 3. if (T1 < B) => Q1 = 0; T2 = T1 A2; else => Q1 = 1; T2 = (T1-B) A2 ; … if Tk < B => Qk = 0; Tk+1 = Tk Ak+1; else Qk = 1; Tk+1 = (Tk-B) Ak+1; if T3 < B => Q3 = 0; R4 = T3; else Q3 = 1; R4 = (T3-B); The rules for divider4

  16. Tk B B 0000 < 0 Tk – B DeMUX Tk S Tk - S D0 Tk+1 Qk The building block M4 for divider4 Ak+1 Tk B

  17. B[0:3] B[0:3] B[0:3] B[0:3] 000A0 A2 A1 A3 M4 M4 M4 M4 Divider4 X R0..R3 Q0 Q2 Q1 Q3

  18. References: • http://www.asic-world.com/digital/arithmetic.html • http://bwrc.eecs.berkeley.edu/IcBook/slides.htm • chapter 11.

More Related