Fall 2016

Henry

CSC 1301

CSc 1301: PRINCIPLES OF COMPUTER SCIENCE Lab 5 Binary Arithmetic Use this to go over in class Rules of Binary Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0, and carry 1 to the next more significant bit For example, 00011010 + 00001100 = 00100110 1 1 carries 0 0 0 1 1 0 1 0 = 26 (base 10) + 0 0 0 0 1 1 0 0 = 12 (base 10) 0 0 1 0 0 1 1 0 = 38 (base 10) 00010011 + 00111110 = 01010001 1 1 1