Question: Part II: Binary Addition (5 points) Place your answer to this problem in the binary_ adder.py file In lecture, we discussed data representation, including binary
Part II: Binary Addition (5 points) Place your answer to this problem in the "binary_ adder.py" file In lecture, we discussed data representation, including binary (base 2) representation. Addition is a common arithmetic operation, and it can be performed on numbers in any base. In fact, binary addition is simpler than base 10 addition because there are fewer rules. Like base 10 addition, binary addition works from right-to-left, adding one pair or column of digits at a time, according to the following rules: 0+00 0+1-1 1 + 1 0, plus a carry bit of l (for the next column)recall that l + 2, and 2 is represented as 10 in binary If you have three Is to add (I1. plus a carry bit of I from the previous column), the sum is 1, with a carry bit of I (11+ 1- 3, and 3 is represented as 11 in binary For example, consider the following addition problem (11+1 n base 10): 1011 +1011 We start by adding the rightmost column. 1 plus 1 gives us 0, plus a carry bit of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
