ee120a Lecture 16 - Datapath Components - Subtractors (Slides 2x1 bw)

Ee120a Lecture 16 - Datapath Components - Subtractors (Slides 2x1 bw)

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Logic Design Datapath Components SUBTRACTORS EE120A Lecture 16 Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtraction Example When computing by hand subtraction is achieved by borrowing 1’s from the left
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtractor s Can build subtractor as we built carry-ripple adder s Mimic subtraction by hand s Compute borrows from columns on left s Use full-subtractor component: s wi is borrow by column on right, wo borrow from column on left 1 1 0 0 0 1 1 1 1 1 0 - 1stcolumn 1 1 0 1 0 10 0 1 1 1 0 1 1 - 3rd column 1 1 0 0 0 0 1 1 1 0 0 1 1 - 4th column wo a3 a b FS wi wo s b3 s3 a2 a b FS wi wo s b2 s2 a1 a b FS wi wo s b1 s1 a0 a3 a2 a1 a0 b3 s3s2s1s0 wo wi b2 b1 b0 a b FS wi wi wo s b0 s0 (b) (c) 4-bit subtractor a 1 1 0 0 1 1 1 1 1 1 0 - 2ndcolumn 10 10 SUM SUBTRACT Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtractor Design Using Adders a) Full adder; b) full subtractor; c) interpreting 74x999 as a full subtractor; d) ripple subtractor
Background image of page 2
3 Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtractor Example: DIP-Switch Based Adding/Subtracting Calculator s Extend earlier calculator example s Switch f indicates whether want to add (f=0) or subtract (f=1) s Use subtractor and 2x1 mux DIP switches 1 0 8-bit register CALC LEDs e f clk ld 8 8 8 0 0 8 8 8 8 8 2 x 1 0 1 1 0 wi ci A A B B S S co wo 8-bit adder 8-bit subtractor Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtractor Example: Color Space Converter – RGB to CMYK (1/4) s Color s Often represented as weights of three colors: red, green, and blue (RGB) s Perhaps 8 bits each, so specific color is 24 bits s White: R=11111111, G=11111111, B=11111111 s Black: R=00000000, G=00000000, B=00000000 s Other colors: values in between, e.g., R=00111111, G=00000000, B=00001111 would be a reddish purple s Good for computer monitors, which mix red, green, and blue lights to form all colors Printers use opposite color scheme ( CMYK ) Because inks absorb light Use complementary colors of RGB: C yan (absorbs red), reflects green and blue, M agenta (absorbs green), and Y ellow (absorbs blue)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Lecture 16 Datapath Components – Subtractors Instructor: Roman Chomko EE120A Logic Design, 10U Electrical Engineering University of California - Riverside Subtractor Example:
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/13/2011 for the course EE 120a taught by Professor Roman during the Spring '11 term at Cornell.

Page1 / 12

Ee120a Lecture 16 - Datapath Components - Subtractors (Slides 2x1 bw)

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online