BCS-011_CHAPTER 2 Number Systems, Operations, and Codes II #ignou #bca #onlinetechplatform #ignoubca Presentation on theme: "CHAPTER 2 Number Systems, Operations, and Codes"— Presentation transcript: 1 CHAPTER 2 Number Systems, Operations, and Codes Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes 2 Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of 10 with each position weighted by a factor of 10: 3 Binary Numbers Two digits called bits 0 or 1 Right most bit is least significant bit Left most bit is most significant bit Each position is weighted by a factor of 2. Decimal point 4 Counting in Binary Decimal Number Binary Number 5 Figure 2–1 Illustration of a simple binary counting application. Thomas L. Floyd Digital Fundamentals, 9e 6 Binary Numbers The binary number system has two digits: 0 and 1 The binary numbering system has a base of 2 with each position weighted by a factor of 2: 7 Binary to Decimal Add the weights of all the bits that are 1. Ignore the bits that are 0. Convert to decimal. 1st determine the weights = = = 109 8 Decimal-to-Binary Conversion Sum-of-weights method Repeated division-by-2 method Conversion of decimal fractions to binary 9 Repeated Division by 2 Divide the number by 2 and write down the remainder. Continue the process until the whole-number quotient is 0. Convert decimal 19 to binary. Convert decimal 45 to binary. 10 Decimal Fractions Repeated multiplication by 2 Multiply the decimal fraction by 2 Write down the carry bit if more than 1 Continue process until you have the desired number of bits or when the fractional part is all zeros. 11 Convert to binary Carry MSB LSB X 2 = X 2 = X 2 = X 2 = 12 Binary Arithmetic Binary addition Binary subtraction Binary multiplication Binary division 13 Complements of Binary Numbers 1’s complements 2’s complements 14 Complements of Binary Numbers 1’s complement Change all 1s to 0s and all 0s to 1s 15 Complements of Binary Numbers 2’s complement Find 1’s complement and then add 1 16 Signed Numbers 17 Topics for Signed Numbers Signed-magnitude form 1’s and 2’s complement form Floating-point numbers 18 Signed Numbers Signed-magnitude form The sign bit is the left-most bit in a signed binary number A 0 sign bit indicates a positive magnitude A 1 sign bit indicates a negative magnitude 19 Signed Numbers 1’s complement form 2’s complement form A negative value is the 1’s complement of the corresponding positive value 2’s complement form A negative value is the 2’s complement of the corresponding positive value 20 Signed Numbers Decimal value of signed numbers Sign-magnitude 1’s complement 2’s complement 67 Digital Codes Extended ASCII code (80h – FFh) Non-English alphabetic characters Currency symbols Greek letters Math symbols Drawing characters Bar graphing characters Shading characters 68 Error Detection and Correction Codes 69 Error Detection and Correction Codes Parity error codes Odd parity – odd sum of 1’s Even parity – even sum of 1’s The sum includes the parity bit Parity bit can be at beginning or end of the code. Can detect single bit errors, but not 2 or more errors. Hamming error codes 70 Error Detection and Correction Codes Parity error codes 71 Error Detection and Correction Codes 1 2 3 4 5 6 7 8 9 A B C D E F Hamming error codes Hamming code words Hex equivalent of the data bits Tags: software,otp,online,platform,computereducation,knowledge,learning,onlinetechplatform,#hindi,msword,education,#technology,#hardware,#TechKnowledge,#DigitalIndia,#TechTutorials,#mathproblems,#vipmobilenumber,#type,#instagood,#mathskills,#vanity,#vanitynumbers,#mobilenumber,#vvvip,#vanitymobilenumbers,#oooo,#ooooo,#oooooo,#vipnumbers,#mathpuzzle,#energy,#smart,#photography,#instagram,#mathmemes,#design,#montessori,#numberpuzzle,#science,#explore,#angelnumbers,#creative,#mathematical,#colors,#facts