Binary MathematicsCounting systemBase 10 counting systemNumbersBase 10 (Decimal numbers)Binary CodeBase 10 vs Base 2Binary Bits and BytesSlide 9Slide 10Base 10 to BinaryBinary mathematicsHexadecimal (base 16)Lookup tableExampleWisdom saidQuizAnswerBinary MathematicsCounting systemThere are three kinds of people in the world: those who can count, and those who can not. - Unknown WisdomToday’s classNumbering systemConversion between 10 based and 2 based numbering system.Binary Mathematics.QuizBase 10 counting systemWe happened to use the current counting system, because we happened to have ten fingers.If dinosaurs had ruled the earth, they would be happy to use a 8-based counting system.NumbersAncient AfricaNotches on a bone.Egyptians/RomanEach magnitude is represented by a symbol. Indian/Arabian (Modern numbering system)1,475,268Base 10 (Decimal numbers)What does 157 mean?157 = 1 x 100 + 5 x 10 + 7 x 1 = 1 x 102 + 5 x 101 + 7 x 100Binary CodeImagine a specie that only has two fingers. how can they count? A computer is such kind of two-finger specie. 0 and 1Each place is the exponential of 2Base 10 vs Base 2Base 10157157 = 1 x 100 + 5 x 10 + 7 x 1 = 1 x 102 + 5 x 101 + 7 x 100Base 21011 = 1 x 23 + 0 x 22 + 1 x 21 + 1 x 201011 = 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1Binary Bits and Bytes1 bit is a single bit of information, a 1 or 0Only two possible values1 byte is 8 bits, an 8 bit word256 possible values from 0-255 base 10 or 00000000 to 11111111 base 210100110 is a single byteBase 10 to BinaryBinary mathematics0+0=01+0=11+1=10Hexadecimal (base 16) Binary code is too long in representation. Hex is much shorter.Converting a binary number to a Hex number is relatively easyEvery 4 bit can convert to a HexProblem: we are short of numbersA-10 B-11 C-12 D-13 E-14 F-15Lookup tableBinary Hex Binary Hex0000 0 1000 80001 1 1001 90010 2 1010 A0011 3 1011 B0100 4 1100 C0101 5 1101 D0110 6 1110 E0111 7 1111 FExampleWisdom saidThere are 10 kinds of people in the world, those who use binary counting system, and those who don’t.QuizNo Calculators!!!!Convert binary code to Decimal number.10100101 (Bin)Convert Decimal number to binary code176 (Dec)Convert Hexadecimal number to binaryBADDEFAdd these two binary numbers10001101+11011100=?Answer10100101 (Binary) = 165 (Decimal)176 (Decimal)= 10110000 (Binary)BADDEF=1011,1010,1101,1101,1110,1111The result of
View Full Document