Question: We want to add two binary numbers. a will consist of two bits a1 a0 and b will consist of two bits b1 b0.
We want to add two binary numbers. a will consist of two bits a1 a0 and b will consist of two bits b1 b0. If we add the numbers, the result will be s, which consist of three bits s2 s1 so (a reminder that it is possible for numbers to start with one or more 0 bits). For example, when ala0 = 11 and b1b0 = 11, we will have s2s1s0 = 110. In general, we have d2 d a1 ao + b bo S2 S1 S0 Where d2 and d1 are called second and first carry bits respectively. a) Write a Boolean formula for so. Submit a file named pla.py. b) Write a Boolean formula for s1. Submit a file named p1b.py. c) Write a Boolean formula for s2. Submit a file named p1c.py.
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
Here are the Boolean formulas for each part a p1apy def calculates0a2 a1 b1 b0 retu... View full answer
Get step-by-step solutions from verified subject matter experts
