Difference between revisions of "CSC103: DT's Notes 2"
Line 17: | Line 17: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
+ | We saw last week the importance of Boole and Shannon for the field of computer science. | ||
+ | |||
+ | What Shannon gave us is the ability to look at binary arithmetic as a logical process. When we add two bits together, we get two new bits as a result. One that is the '''sum''' and one that is the '''carry''' bit that is fed to the next column, the one on the left, when adding by hand. Refer to the page for [[CSC103:_DT%27s_Notes_1 | Week 1]] if you need to refresh your memory. | ||
+ | |||
+ | We name the two bits we're adding '''a''' and '''b''', for convenience. We call the ''sum'' bit '''S''', and the ''carry'' bit '''C'''. | ||
+ | The logic equations for '''S''' and '''C''' become: | ||
+ | |||
+ | ::'''S''' = ( '''a''' ''and'' ''not'' '''b''' ) ''or'' ( ''not'' '''a''' ''and'' '''b''' ) | ||
+ | |||
+ | ::'''C''' = '''a''' and '''b''' | ||
+ | |||
+ | |||
Revision as of 15:22, 6 February 2012
--D. Thiebaut 15:07, 6 February 2012 (EST)