TRUTH ABOUT NUMBER SYSTEMS.

Number Systems

                                  

Mathematical notation/symbols for representing values (numbers). In different systems, different symbols are used.

                                     

Positional Number System


We are used to dealing with numbers in the decimal system. This is probably a result of having ten fingers. It is a is a positional number system. Roman number system is not such a system. The position of the symbol denotes the magnitude. A positional number system uses a base (aka radix). A number system with base 𝑏 is a system that uses distinct symbols for 𝑏 digits. The most common base used in everyday activities is 10 (Decimal System). Different bases are used in other situations. The base can be written as a subscript to the number for easy identification. 4 types of positional number systems are discussed.
• Decimal (Base = 10, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}).
• Binary (Base = 2, {0, 1}).
• Octal (Base = 8, {0, 1, 2, 3, 4, 5, 6, 7, 8}).
• Hexadecimal (Base = 16, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}).
To determine the quantity, it is necessary to multiply each digit by an integer power of the base and then form the sum of all weighted digits.

                              

Binary Number System


Mainly used in computers and computer-based devices. A computer contains electronic components that uses voltages. Therefore numbers are represented in a computer with a base of 2. All other information is represented using a binary code as well.
• Letters of the alphabet and punctuation marks
• Microprocessor instruction
• Graphics/Video
• Sound

Number Base Conversion


Should be able to convert a number in one base to another base.
• Decimal ↔ Binary
• Decimal ↔ Octal
• Decimal ↔ Hexadecimal
• Binary ↔ Octal

Repeated Division Method


Can be easily used to convert a decimal number to another base.
1. Divide the number successively by the base.
2. After each division record the remainder.
3. The result is read from the last remainder upwards.

                           

Repeated Subtraction Method


Can be used to convert a decimal number to binary.
1. Starting with the 1s place, write down all of the binary place values in order until you get to the first binary place value that is GREATER THAN the decimal number you are trying to convert.
2. Mark out the largest place value (it just tells us how many place values we need).
3. Subtract the next place value from the decimal number. Place a “1” under that place value.
4. For the rest of the place values, try to subtract each one from the previous result.
       4. If you can, place a “1” under that place value.
       5. If you can’t, place a “0” under that place value.
5. Repeat Step 4 until all of the place values have been processed.

Other Base Conversions


• Binary/Octal/Hexadecimal to Decimal

1. Take the left most none zero bit,
2. Multiply by the base and add it to the bit on its right.
3. Now take this result, multiply by the base it and add it to the next bit on the right.
4. Continue in this way until the right-most bit has been added in.
The fundamental setup of positional number systems can be used as well.

• Binary to Octal/Hexadecimal

1. Form the bits into groups of three/four starting at the right and move leftwards.
2. Replace each group of three bits with the corresponding octal/hexadecimal digit.

• Octal/Hexadecimal to Binary

1. The opposite of the above process is used.

Conversion of Fractions


• Decimal Fractions to Binary Fractions

1. Begin with the decimal fraction and multiply by 2. The whole number part of the result is the first binary digit to the right of the point.
2. Disregard the whole number part of the previous result and multiply by 2 once again. The whole number part of this new result is the second binary digit to the right of the point.
3. Continue this process until we get a zero as our decimal part or until we recognize an infinite repeating pattern.

• Binary Fractions to Decimal Fractions


The fundamental setup of positional number systems
used in converting binary integers to decimals can be
used here.

Summary


• Understand the numerical system.
• Explain why computer designers chose to use the binary system for representing information in computers.
• Explain different number systems.
• Translate numbers between number systems.
• Understanding the pattern in each set of conversions will make it easier to remember the methods.

Next Lecture:- Computer Arithmetic

Comments

Post a Comment