* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Survey

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Transcript

Octal Numbering System 1-Binary to Octal Conversion It is easy to convert from an integer binary number to octal. This is accomplished by: 1. Break the binary number into 3-bit sections from the LSB to the MSB. 2. Convert the 3-bit binary number to its octal equivalent. For example, the binary value 1010111110110010 will be written: Assignment: Problem #9 2-Octal to Binary Conversion It is also easy to convert from an integer octal number to binary. This is accomplished by: 1. Convert the decimal number to its 3-bit binary equivalent. 2. Combine the 3-bit sections by removing the spaces. For example, the octal value 127662 will be written: Assignment: Problem #8 3-Octal to Decimal Conversion To convert from Octal to Decimal, multiply the value in each position by its Octal weight and add each value. Using the value from the previous example, 127662Q, we would expect to obtain the decimal value 44978. Assignment: Problem #6 4-Decimal to Octal Conversion To convert decimal to octal is slightly more difficult. The typical method to convert from decimal to octal is repeated division by 8. While we may also use repeated subtraction by the weighted position value, it is more difficult for large decimal numbers. Repeated Division By 8 For this method, divide the decimal number by 8, and write the remainder on the side as the least significant digit. This process is continued by dividing he quotient by 8 and writing the remainder until the quotient is 0. When performing the division, the remainders which will represent the octal equivalent of the decimal number are written beginning at the least significant digit (right) and each new digit is written to the next more significant digit (the left) of the previous digit. Consider the number 44978. Assignment: Problem #7 Octal to Hexadecimal Conversion This is accomplished by: 1. 2. 3. 4. Convert the octal number to its 3-bit binary equivalent Combine the 3-bit sections by removing the spaces. Break the binary number into 4-bit sections from the LSB to the MSB. Convert the 4-bit binary number to its Hex equivalent. Example 1: Convert 578248 to N 16 . Assignment: Problem #4 Hexadecimal to Octal Conversion This is accomplished by: 1. 2. 3. 4. Convert the Hex number to its 4-bit binary equivalent. Combine the 4-bit sections by removing the spaces. Break the binary number into 3-bit sections from the LSB to the MSB. Convert the 3-bit binary number to its octal equivalent. Example 1: Convert 0AFB216 to N 8 . Assignment: Problem #10