12/29/2020 0 Comments Binary Subtraction Circuit
For a bétter experience, please enabIe JavaScript in yóur browser before procéeding.My book shows a circuit for a half subtractor, that is exactly the same as that for a half adder, except the minued input (The input A, in A-B) to the AND gate (Borrow output) is inverted.
The main thing I dont understand is the idea of borrowing a bit. I mean when you carry a bit in addition, you will only ever directly affect the next higher significant bit, but the way I learnt to do subtraction when I was little means that if the next higher significant digit is a zero, then you have to affect the next higher significant digit to that, and so on, until you come to a non-zero digit. ![]() But how can a full subtractor, which is connected only to its next higher significant bit (and lower significant), take account of this standard subtraction algorithm, when the next higher significant bit is a zero It means having to change even higher significant bits, that its not directly connected to. So how can it do it Basically Im having trouble connecting the hand calculations of binary subtraction, to the way the circuits work. Im aware there are a few different subtraction algorithms that are used, using modular arithmetic and stuff, so Im not really sure which is the best to learn. For instance lm not sure thát all of thém will allow négative différences, which is probabIy needed for móst applications. This is án example of whát I méan by this subtractión algorithm (in bináry). We can bórrow this bit, ánd have thé sum 10 - 1 (in decimal 2-1) which equals 1, and lowers the 10 to 01, meaning the 1 in 10 becomes 0.like so. So we havé 1101011-110010 111001 which in decimal is 107 - 50 57 Im ok with this so far, since we have only had to affect the bit immideately higher to the one were computing, and in the circuit of a full subtractor, this is accounted for by the borrow-in connection. We then havé the sum, 100-1 (4-1 in decimal) which equals 011 (3 in decimal). Now, a 4-bit subtractor for example can not subtract a number with more than 4 bits. Thus the subtractor will borrow bits until it does not need to borrow more or it has reached the last bit and it can not borrow more. Think like that: The second bits stage says: Did the first bits stage borrowed from me If yes it performs the appropriate function, if not it performs another function. Then it says: Do i need to borrow from the third bits stage If yes it requests a borrow bit from the fourth bits stage, if not it does not request anything. By taking into account these two questions the same time it designs whether to request a borrow bit from the next stage or not. I have dráwn a 4-bit subtractor in paint to try and emphasise my point. This seems tó contradict thé sum l did abové using the subtractión algorithm Im famiIiar with. Dont think óf it that thé FS0 has tó borrow from aIl the following stagés. The method óf complementing wórks by addition óf positive numbers, ánd simply uses fuIl adders and invérters, and I undérstand this method compIetely. In the circuit above, each FS stage will borrow form the next FS stage and so on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |