Loading in 5 sec....

Chapter Six NUMBERING SYSTEMSPowerPoint Presentation

Chapter Six NUMBERING SYSTEMS

- 99 Views
- Uploaded on
- Presentation posted in: General

Chapter Six NUMBERING SYSTEMS

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 - - - - - - - - - - - - - - - - - - - - - - - - - -

Chapter SixNUMBERING SYSTEMS

- Way to count
- Types of numbering systems
- Non Systematic
- Old Egyptian numbers.
- Roman numbers

- Systematic (positional)
- Arabic numbers
- Indian numbers

- Non Systematic

- 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.

- 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

- Symbols

- 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

- 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)

- 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

- (dn…..d2 d1 d0 . d-1 d-2 ……) R = ( )10

- 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.

- 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

- Addition
- 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.

- 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 using the borrow technique.
- Subtraction using the two’s complement
- Two’s complement. (one’s complement +1)
- One’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 subtraction which is described below to do the subtraction.

- 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.

- Way to represent negative values.
- Change every one in binary to zero and every zero to 1

- Convert (1010011)2 one’s complement.
- (0101100) 1’s

- Convert (1000010011) which is one’s complement to its binary value.
- (0111101100)2

- 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.

- 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 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.

- 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)

- Number of digits ( we need 5 digits for those numbers) so , we add trailing zeros

- 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)

- Number of digits ( we need 5 digits for those numbers) so , we add trailing zeros