__O____C____T____A____L NUMBERS__

Like the hexadecimal system, the octal system provides a convenient way to express binary numbers and codes. However, it is used less frequently than hexadecimal in conjunction with computers and microprocessors to express binary quantities for input and output purposes.

The octal system is composed of eight digits, which are: 0, 1, 2, 3, 4, 5, 6, 7

To count above 7, begin another column and start over: 10, 11, 12, 13, 14, 15, 16, 17, 20, 21 and so on. Counting in octal is similar to counting in decimal, except that the digits 8 and 9 are not used.

__O____C____T____A____L____-____T____O____-D____E____C____I____M____A____L CONVERSION__

Since the octal number system has a base of eight, each successive digit position is an increasing power of eight, beginning in the right-most column with 8º. The evaluation of an octal number in terms of its decimal equivalent is accomplished by multiplying each digit by its weight and summing the products.

Let‘s convert octal number 2374 in decimal number.

**W****e****ig****h****t 8³ 8² 8****1 ****8****0**

**O****ct****a****l number 2 3 7 4**

**237****4 = (2 x 8³) + (3 x 8²) + (7 x 8****1****) + (4 x 8º) =1276**

__D____E____C____I____MA____L____-____TO____-____O____C____T____A____L CONVERSION__

A method of converting a decimal number to an octal number is the repeated division-by-8

method, which is similar to the method used in the conversion of decimal numbers to binary or to hexadecimal.

Let‘s convert the decimal number 359 to octal. Each successive division by 8 yields a remainder that becomes a digit in the equivalent octal number. The first remainder generated is the least significant digit (LSD).

**359****/****8 = 44.875 0.875 x 8 = 7 (LSD)**

**4****4 /8 = 5.5 0.5 x 8 = 4**

**5****/****8****= 0.625 0.625 x 8 = 5 (MSD) The number is 547.**

__O____C____T____A____L____-____T____O____-____BI____NAR____Y CONVERSION__

Because each octal digit can be represented by a 3-bit binary number, it is very easy to convert from octal to binary.

Octal Digit | 0 1 2 | 3 | 4 5 6 | 7 |

Binary | 000 001 010 | 011 | 100 101 110 | 111 |

Let‘s convert the octal numbers 25 and 140. | ||||

Octal Digit | 2 | 5 | 1 4 0 | |

Binary | 010 | 101 | 001 100 000 |

__BI____NARY-____T____O____-____O____C____T____A____L CONVERSION__

Conversion of a binary number to an octal number is the reverse of the octal-to-binary conversion.

Let‘s convert the following binary numbers to octal:

**1 1 0 1 0 1 1 0 1 1 1 1 0 0 1**

**6 5 = 65 5 7 1 = 571**

__A____L____G____O____R____I____T____H____M__

**A****lgo****r****i****t****h****m**

· Set of step-by-step instructions that perform a specific task or operation

· ―Natural‖ language NOT programming language

**P****s****e****ud****o****c****o****d****e**

· Set of instructions that mimic programming language instructions

**F****l****o****w****c****h****a****r****t**

· Visual program design tool

· ―Semantic‖ symbols describe operations to be performed

__F____LOW____C____H____AR____T____S__

**De****finitions:**

A flowchart is a schematic representation of an algorithm or a stepwise process, showing the steps

as boxes of various kinds, and their order by connecting these with arrows. Flowcharts are used in designing or documenting a process or program.

A flow chart, or flow diagram, is a graphical representation of a process or system that details the sequencing of steps required to create output.

A flowchart is a picture of the separate steps of a process in sequential order.

## No comments:

## Post a comment