1 / 40

Chapter Six NUMBERING SYSTEMS

Chapter Six NUMBERING SYSTEMS. Numbering systems . Way to count Types of numbering systems Non Systematic Old Egyptian numbers. Roman numbers Systematic (positional) Arabic numbers Indian numbers. Positional numbering systems properties. Symbols Phonetic Symbolic Base (radix)

kemp
Download Presentation

Chapter Six NUMBERING SYSTEMS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter SixNUMBERING SYSTEMS

  2. Numbering systems • Way to count • Types of numbering systems • Non Systematic • Old Egyptian numbers. • Roman numbers • Systematic (positional) • Arabic numbers • Indian numbers

  3. Positional numbering systems properties • Symbols • Phonetic • Symbolic • Base (radix) • Number of the symbols is equal to the base • Digits • Relation between digits is that the one in the higher digit divided by the just lower digit is equal to the base. • The value is determined by the face value multiplied by the base to the power of the position of that digit.

  4. Examples • Octal • Symbols • 0, 1, 2, 3, …. ,7 • One, two , zero , …., seven • Base • 8 • Digits • (11)8 --- 1 in the higher digit / 1 in the lower digit = (8)10

  5. How to pronounce a number in any system? • Start from left to right • Pronounce each digit at a time • At the end , pronounce in System so. • Example (121)8 • One two one in octal • Example (A98B)16 • A nine eight B in hexadecimal • Example (1101.1)2 • One one zero one point one in binary

  6. Examples of numbering systems • There are many types, but we are going to study only some of them • Binary system ( Base 2) • Octal system ( Base 8) • Decimal (denary) (base 10) • Hexadecimal (base 16)

  7. Conversion between Systems • We are familiar with decimal system. • It is a good way to convert from/to decimal system • Two ways to convert • From any system to decimal • From decimal to any system

  8. Conversion to Decimal • (dn…..d2 d1 d0 . d-1 d-2 ……) R = ( )10

  9. Examples

  10. Example

  11. Another method to convert to decimal • Place the face value with space doubling between digits • Place under each digit the weight of it which is the power of the base of that number. • Multiply the number by its weight into a third row. • Sum all the numbers in the third row

  12. Examples

  13. Conversion from Decimal System to any other system (Integer part only). • You do integer division with the whole part by the required base until you reach the zero value as the quotient. • The following shape shows the processing of doing this. • Integer division process is illustrated in the following shape.

  14. Examples

  15. Example

  16. Converting from one system to another system using number of digits • This method is for certain types of system which has a relation between. • Suppose you have two numbering systems: R1 and R2. there is a conversion method those two systems if R1n1 = R2n2, where n1 and n2 are both integer values greater than 0 and one of them is 1. • What is meant by that? It means that every digit from R1 is equivalent to n2 of digits from R2 • Examples: 23 = 81 and 24 = 161 , which means every 3 digits of the binary system is equivalent to one digits in octal and so on.

  17. Method for converting using the number of digits. • Make a table for the two systems that have the relation discussed in previous charts. • You didn’t need to do that every time if you memorize that table. • Group n2 of digits of the second system and replace it with one digit of first system starting from the right of the number. • Or for every digit of first system, replace it with n2 digits of the second system

  18. Example

  19. Example

  20. Example

  21. Mathematical operations on binary system • Addition • Subtraction • Normal way • Two’s complement

  22. Addition of binary numbers • Align the binary numbers based on the fraction point. • Add leading zero to the fraction part for the number that has less digits and tailing zeros to the whole number for the number that has less digits. • Use the table of the addition which is described below to do the addition.

  23. Example of binary addition

  24. Addition example (cont)

  25. Addition technique if you have more than two binary numbers. • Align all the number beneath each other based on the fraction point. • Strike through each two ones of one digit and replace them with one on the just higher digit. • Each column (digit) which has a single one the result will be one, and if doesn’t has any remaining ones then the result is zero. • Repeat for all the digit until the last digit

  26. Example

  27. Subtraction with binary system • Subtraction using the borrow technique. • Subtraction using the two’s complement • Two’s complement. (one’s complement +1) • One’s complement

  28. Subtraction with borrow. • Align the binary numbers based on the fraction point. • Add leading zero to the fraction part for the number that has less digits and tailing zeros to the whole number for the number that has less digits. • Use the table of the subtraction which is described below to do the subtraction.

  29. How to perform subtraction with borrow • Align the two binary numbers starting from the fraction point. • Do the following for each column of the numbers (four cases). • If the two values of a single column are either zeroes or ones , then the result is zero with no borrow. • Else if the higher value is one then the result is one with no borrow. • Else, which means that (the top minuend is 0 and the subtrahand is one), we need to borrow. The borrow means we take one from the just higher bit leaving the one to be zero (cross it) . This borrowed one is interchanged to the lower bit into two ones. For this whole column cross out two ones and the remaining one is the result.

  30. Four Cases

  31. Example of Subtraction with Borrow

  32. One’s Complement • Way to represent negative values. • Change every one in binary to zero and every zero to 1

  33. Example • Convert (1010011)2 one’s complement. • (0101100) 1’s • Convert (1000010011) which is one’s complement to its binary value. • (0111101100)2

  34. Two’s complement • It is a way to represent a number with both value and sign. • The most important property is that the Most Significant Bit has a negative weight. • To convert from two’s complement to decimal is an easy way. The only difference is that during computation the weight of the last bit is negative.

  35. Example to convert from two’s complement to decimal.

  36. Converting from decimal number to two’s complement • We have two cases. • If it is a positive decimal number. It is the same as normal binary except that you add 0 as MSB to the binary number. • If it is negative decimal number. • Treat the number as if it is positive. • Convert it to binary number. • Put Zeroes to the left of the number. • Convert the zero to one and one to zero for all digits • Add one to the whole number.

  37. Subtraction using two’s complement • Subtraction process requires two operands: minuend and subtrahend, normally the subtrahend is greater than the minuend. • Make sure you have more digits that accommodate the value of the numbers by adding zeros to the left of the two numbers. • Convert the subtrahend to two’s complement. • Add the two numbers. • If the number of digits of the result exceeds numbers of digits both numbers. Cancel that digit.

  38. Example of Two’s complement subtraction. • Subtract 1001 from 101. • Number of digits ( we need 5 digits for those numbers) so , we add trailing zeros • Minuend becomes 00101 and the subtrahend becomes 01001 • Convert the subtrahend to two’s complement • So it 01001 becomes 10111 • Add both numbers: 00101 to 10111 • 00101 +10111 = 11100 • As the number of digits of the result is that same as the number of the digits of both number. This is the result. • (Note that as the last bit of the result is 1, it means the number is negative , to find its value. Follow the rules to convert from two’s complement to decimal)

  39. Example of Two’s complement subtraction. • Subtract 110 from 1011. • Number of digits ( we need 5 digits for those numbers) so , we add trailing zeros • Minuend becomes 01011 and the subtrahend becomes 00110 • Convert the subtrahend to two’s complement • So it 00110 becomes 11010 • Add both numbers: 01011 to 11010 • 01011+ 11010 = 100101 • Because we have six digits, the left most digits is discarded and keep the number of the digits to 5. the result will b 00101 • (Note that as the last bit of the result is 0, it means the number is positive, to find its value. Follow the rules to convert from two’s complement to decimal)

More Related