Class Notes (837,315)
CSC258H1 (46)
Lecture

# jan23ce.docx

2 Pages
90 Views

Department
Computer Science
Course
CSC258H1
Professor
Steve Engels
Semester
Winter

Description
SubtractorsEx an 8bit binary number there at 256 possible o Subtractors are an extension of adders values that can be stored One of them is 0 there areBasically perform addition on a negative number 128 negative values 11111111 to 10000000 andNegative binary numbers 2 versions o127 positive values 00000001 to 01111111Unsigneda separate bit exists for the sign o Subtraction circuitData bits store the positive version of the numberSignedall bits used to store a Twos Complement negativeo Twos ComplementFirst obtain Ones Complement n Given number X with n bits take 21XResult negates each individual bit a bitwise NOT opTwos Complement1s Complement1Note adding a 2s complement number to the original Note SubXORY inverts Y if Sub is high else Y unchanged number produces a result of zero Sub Y Result 0 0 0 0 1 11 0 1 o Unsigned Subtraction 1 1 01 Get the Twos Complement of the subtrahend Comparatorsterm being subtracted ie usually the smaller value o A circuit that takes in two input vectors and determines if the first is2 Added that value to the minuend greater than less than or equal to the secondterm being subtracted from ie usually the larger valueo Basic comparators3a If there is an end carry C is high the final result isConsider two binary numbers A and B both are 1bit long outpositive and does not change The circuits for this would be3b If there is no end carry C is low get the 2s complement out ABof the result and add a negative sign to it or set the sign bitABhighAB Ex 5327 2753What if A and B are two bits long The terms for this circuit for have to expand to reflect the second signal AB need to check the values of both bit1 and bit0 are the sameAB
More Less

Related notes for CSC258H1
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.

Get notes from the top students in your class.

Request Course
Submit