Sei sulla pagina 1di 5

NUMBER SYSTEM

A numeral system (or system of numeration) is a writing system for expressing numbers, that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. It can be seen as the context that allows the symbols "11" to be interpreted as the binary symbol forthree, the decimal symbol for eleven, or a symbol for other numbers in different bases. Ideally, a numeral system will:

Represent a useful set of numbers (e.g. all integers, or rational numbers) Give every number represented a unique representation (or at least a standard representation) Reflect the algebraic and arithmetic structure of the numbers

Conversion between Decimal and Binary


Converting a number from binary to decimal is quite easy. All that is required is to find the Decimal value of each binary digit position containing a 1 and add them up. For example: convert 101102 to decimal. 10110 \ \ \___________1 x 21 = 2 \ \____________1 x 22 = 4 \_______________1 x 24 = 16 22

Decimal to Octal
Here is an example of using repeated division to convert 1792 decimal to octal: Decimal Number Operation Quotient Remainder 1792 224 28 3 0 8= 8= 8= 8= Done. 224 28 3 0 0 0 4 3 Octal Result 0 00 400 3400

Decimal to Hexadecimal
Here is an example of using repeated division to convert 1792 decimal to hexadecimal : Decimal Number Operation Quotient Remainder 1792 112 7 0 16 = 16 = 16 = done. 112 7 0 0 0 7 Hexadecimal Result 0 00 700

The only addition to the algorithm when converting from decimal to hexadecimal is that a table must be used to obtain the hexadecimal digit if the remainder is greater than decimal 9.
Binary to Decimal Conversion

Since binary is a base-2 system, each digit represents an increasing power of 2, with the rightmost digit representing 20, the next representing 21, then 22, and so on. To determine the decimal representation of a binary number simply take the sum of the products of the binary digits and the powers of 2 which they represent. For example, the binary number: 100101 is converted to decimal form by: [(1) x 25] + [(0) x 24] + [(0) x 23] + [(1) x 22] + [(0) x 21] + [(1) x 20] = [1 x 32] + [0 x 16] + [0 x 8] + [1 x 4] + [0 x 2] + [1 x 1] = 37

Octal to Decimal Conversion

The first eight digits of decimal numbers from 0 to 7 used for Octal number system. Therefore the base of octal number system is represented by 8. The decimal number system uses 10 numbers from 0 to 9. Therefore the decimal numbers base is represented by 10. In certain operations, Octal to Decimal number conversion is necessary to understand the operations by the humans. The below example lets you understand how to convert equivalent decimal number from the octal number Example: Convert Octal number 143 to its decimal equivalent = 1 x 82 + 4 x 81 + 3 x 80 = 1 x 64 + 4 x 8 + 3 x 1 = 64 + 32 + 3 = 99 The equivalent decimal number is 99

Hexadecimal to Decimal Converter


This below example is the basic principle used in this Hexadecimal to Decimal conversion. Convert the Hex number 2AF3 into its equivalent Decimal Number. The Hex number 2AF3 can be written as in the below form. The sum of all the units yield the equivalent decimal value (2 x 163) + (10 x 162) + (15 x 161) + (3 x 160) = 10995

Binary to Octal Conversion


The Binary numbers base is represented by 2 and the Octal numbers base is represented by 8. The third power of binary numbers is called as Octal numbers. In order to convert the Binary number into its equivalent octal numbers, split the given binary number into groups and each group should contain three binary bits and then converting each group into its equivalent octal number from the below conversion table will yield the result. The below example lets you understand the Binary to octal conversion Example: Convert Binary number (111110011001)2 to its octal equivalent

Octal to Binary Conversion


In order to get the equivalent Binary number for the given octal number, write the individual octal digit in its equivalent binary numbers from the below conversion table that yields you the binary number equivalent. The below example lets you understand the hex to binary conversion clear Example: Convert Hexadecimal number (536)8 to its binary equivalent

Binary to Hexadecimal
Binary may be converted to and from hexadecimal somewhat more easily. This is because the radix of the hexadecimal system (16) is a power of the radix of the binary system (2). More specifically, 16 = 24, so it takes four digits of binary to represent one digit of hexadecimal, as shown in the table to the right.

Hexadecimal to Binary
Most computers manipulate binary data, but it is difficult for humans to work with the large number of digits for even a relatively small binary

number. Although most humans are familiar with the base 10 system, it is much easier to map binary to hexadecimal than to decimal because each hexadecimal digit maps to a whole number of bits (410). This example converts 11112 to base ten. Since each positionin a binary numeral can contain either a 1 or a 0, its value may be easily determined by its position from the right:

00012 = 110 00102 = 210 01002 = 410 10002 = 810

Fractions

For the fractional part, recall that in binary notation, a number with a value between 0 and 1 is represented by 0.b1b2b3 bi = 0 or 1 has the value (b1 21) + (b2 22) + (b3 23) This can be rewritten as 2 1 (b1 + 21 (b2 + 21 (b3 + This expression suggests a technique for conversion. Suppose we want to convert the number F (0 < F < 1) from decimal to binary notation. We know that F can be expressed in the form F = 21 (b1 + 21 (b2 + 21 (b3 + If we multiply F by 2, we obtain: 2 F = b1 + 21 (b2 + 21 (b3 + From this equation, we see that the integer part of (2 F), which must be either 0 or 1 because 0 < F < 1, is simply b1. So we can say (2 F) = b1 + F1 , where 0 < F1 < 1 and where F1 = 21 (b2 + 21 (b3 + 21 (b4 + To find b2, we repeat the process. Therefore, the conversion algorithm involves repeated multiplication by 2. At each step, the fractional part of the number from the previous step is multiplied by 2. The digit to the left of the decimal point in the product will be 0 or 1 and-6contributes to the binary representation, starting with the most significant digit. The fractional part of the product is used as the multiplicand in the next step. Figure 2 shows two examples. This process is not necessarily exact; that is, a decimal fraction with a finite number of digits may require a binary fraction with an infinite number of digits. In such cases, the conversion algorithm is usually halted after a prespecified number of steps, depending on the desired accuracy. Hexadecimal Notation Because of the inherent binary nature of digital computer components, al

ASSIGNMENT IN DIGILET
Submitted by: Abarico, Aldrin G. 2nd yr. Comtech, M31

Potrebbero piacerti anche