Chapter Six NUMBERING SYSTEMS

1 / 40

# Chapter Six NUMBERING SYSTEMS - PowerPoint PPT Presentation

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)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about ' Chapter Six NUMBERING SYSTEMS' - kemp

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Chapter SixNUMBERING 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
• 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.
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
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
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)
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
Conversion to Decimal
• (dn…..d2 d1 d0 . d-1 d-2 ……) R = ( )10
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
• 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.
• 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.
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
Mathematical operations on binary system
• Subtraction
• Normal way
• Two’s complement
• 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.
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
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
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.
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.
One’s Complement
• Way to represent negative values.
• Change every one in binary to zero and every zero to 1
Example
• Convert (1010011)2 one’s complement.
• (0101100) 1’s
• Convert (1000010011) which is one’s complement to its binary value.
• (0111101100)2
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.
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.
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.
• If the number of digits of the result exceeds numbers of digits both numbers. Cancel that digit.
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)
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)