Sie sind auf Seite 1von 11

Pring, Rose Axl B.

BSHRM IIA

Binary
Binary is a base 2 number system invented by Gottfried Leibniz where numeric
values are represented by different combinations of 0 and 1, also known as OFF or
ON. The primary language of computers, binary is still used in today's machines
because it's a simple and elegant design. Binary's 0 and 1 method is efficient at
detecting an electrical signal's off or on state, or magnetic poles in media like hard
drives. It is also the most efficient way to control logic circuits.

How to read binary numbers


The following chart illustrates the binary number 01101000. Each column
represents the number two raised to an exponent, with that exponent's value
increasing by one as you move through each of the eight positions. In this example,
we get the total value by reading the chart from right to left and adding each
column's value to that of the previous column: (8+32+64) = 104. As you can see,
we do not count
Exponent:
Value:
ON/OFF:

the bits with a 0 because they're "turned off."


27
26
25
24
128
64
32
16
0
1
1
0

23
8
1

22
4
0

21
2
0

The next example is 11111111 in binary, the maximum 8-bit value of 255. Again,
reading right to left we have 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255.
Value:
128
64
32
16
8
ON/OFF:
1
1
1
1
1

4
1

Note: Counting on a computer normally starts with 0 instead of 1. Therefore,


counting all the bits does equal 255, but if you start at 0, it is really 256.
Tip: If you took the binary code from the first example (which totaled 104) and put
it into ASCII, it would produce a lowercase h. To spell the word hi, you would need to
add the binary for the letter i, which is 01101001. Putting these two codes together,
we have 0110100001101001 or 104 and 105, which represents hi.

Decimal
Decimal is a term that describes the base-10 number system, probably the most
commonly used number system. The decimal number system consists of ten
single- digit numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The number after 9 is 10. The
number after 19 is 20 and so forth. Additional powers of 10 require the addition of
another positional digit.

2
1

In computing, the binary , octal , or hexadecimal number system may be used


instead of the decimal system. All these schemes have a number of digits that is a
power of 2. This is an advantage in systems that use high and low digital states.

Decimal

Binary

Octal

Hexadecimal

10

11

100

101

110

111

1000

10

1001

11

10

1010

12

11

1011

13

12

1100

14

13

1101

15

14

1110

16

15

1111

17

16

10000

20

10

17

10001

21

11

etc

etc

etc

etc

Optical
In general, optical or optical technology refers to anything that relates to light or
vision, whether it be visible light or infrared light that performs a specific function.
For example, optical fiber, like that shown to the right is a type of wire commonly
made out of glass or plastic that carries light signals. These signals can be
interpreted by a computer as data (binary) and is one example of how data can be
transferred over a network.
A computer mouse is an example of an optical device that uses optical technology.
It uses a light-emitting diode and photodiodes to determine the direction a mouse is
moving across a surface. This then allows the computer to move the mouse cursor
across the computer screen in the appropriate direction. An optical mouse works
best on an opaque surface, where it can detect the direction of movement. Surfaces
like glass and a mirror are not viable surfaces to use an optical device on since
movement cannot be detected. Newer optical mice employ the use of a laser diode
for increased resolution and movement precision.
Optical storage devices use optical technology to save and retrieve data on
discs, like a Blu-ray, CD, DVD. The device uses a laser light to read information on
the disc and to "write" new information to the disc for future retrieval.

Hexadecimal
Hexadecimal describes a base-16 number system. That is, it describes a numbering
system containing 16 sequential numbers as base units (including 0) before adding
a new position for the next number. (Note that we're using "16" here as a decimal
number to explain a number that would be "10" in hexadecimal.) The hexadecimal
numbers are 0-9 and then use the letters A-F. We show the equivalence of binary,
decimal, and hexadecimal numbers in the table below.
Hexadecimal is a convenient way to express binary numbers in modern computers
in which a byte is almost always defined as containing eight binary digits. When
showing the contents of computer storage (for example, when getting a core
dump of storage in order to debug a new computer program or when expressing a
string of text characters or a string of binary values in coding a program or HTML
page), one hexadecimal digit can represent the arrangement of four binary digits.
Two hexadecimal digits can represent eight binary digits, or a byte.

Binary

Decimal

Hexadecimal

10

11

100

101

110

111

1000

1001

1010

10

1011

11

1100

12

1101

13

1110

14

1111

15

10000

16

10

10001

17

11

etc

etc

etc

Conversion

Data conversion is the conversion of computer data from one format to another.
Throughout a computer environment, data is encoded in a variety of ways. For
example, computer hardware is built on the basis of certain standards, which
requires that data contains, for example, parity bit checks.
There are many methods or techniques which can be used to convert numbers
from one base to another. We'll demonstrate here the following:

Decimal to Other Base System

Other Base System to Decimal

Other Base System to Non-Decimal

Shortcut method - Binary to Octal

Shortcut method - Octal to Binary

Shortcut method - Binary to Hexadecimal

Shortcut method - Hexadecimal to Binary

Decimal to Other Base System


steps

Step 1 - Divide the decimal number to be converted by the value of the new
base.

Step 2 - Get the remainder from Step 1 as the rightmost digit (least
significant digit) of new base number.

Step 3 - Divide the quotient of the previous divide by the new base.

Step 4 - Record the remainder from Step 3 as the next digit (to the left) of
the new base number.

Repeat Steps 3 and 4, getting remainders from right to left, until the quotient
becomes zero in Step 3.

The last remainder thus obtained will be the most significant digit (MSD) of the new
base number.
Example
Decimal Number : 2910

Calculating Binary Equivalent:


Step

Operation

Result

Remainder

Step 1

29 / 2

14

Step 2

14 / 2

Step 3

7/2

Step 4

3/2

Step 5

1/2

As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse


order so that the first remainder becomes the least significant digit (LSD) and the
last remainder becomes the most significant digit (MSD).
Decimal Number : 2910 = Binary Number : 111012.
Other base system to Decimal System
Steps

Step 1 - Determine the column (positional) value of each digit (this depends
on the position of the digit and the base of the number system).

Step 2 - Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.

Step 3 - Sum the products calculated in Step 2. The total is the equivalent
value in decimal.

Example
Binary Number : 111012
Calculating Decimal Equivalent:
Step

Binary
Number

Decimal Number

Step 1

111012

((1 x 24) + (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10

Step 2

111012

(16 + 8 + 4 + 0 + 1)10

Step 3

111012

2910

Binary Number : 111012 = Decimal Number : 2910


Other Base System to Non-Decimal System
Steps

Step 1 - Convert the original number to a decimal number (base 10).

Step 2 - Convert the decimal number so obtained to the new base number.

Example
Octal Number : 258
Calculating Binary Equivalent:

Step 1 : Convert to Decimal


Step

Octal
Number

Decimal Number

Step 1

258

((2 x 81) + (5 x 80))10

Step 2

258

(16 + 5 )10

Step 3

258

2110

Octal Number : 258 = Decimal Number : 2110


Step 2 : Convert Decimal to Binary
Step

Operation

Result

Remainder

Step 1

21 / 2

10

Step 2

10 / 2

Step 3

5/2

Step 4

2/2

Step 5

1/2

Decimal Number : 2110 = Binary Number : 101012


Octal Number : 258 = Binary Number : 101012
Shortcut method - Binary to Octal
Steps

Step 1 - Divide the binary digits into groups of three (starting from the
right).

Step 2 - Convert each group of three binary digits to one octal digit.

Example
Binary Number : 101012
Calculating Octal Equivalent:
Step

Binary Number

Octal Number

Step 1

101012

010 101

Step 2

101012

28 58

Step 3

101012

258

Binary Number : 101012 = Octal Number : 258


Shortcut method - Octal to Binary
Steps

Step 1 - Convert each octal digit to a 3 digit binary number (the octal digits
may be treated as decimal for this conversion).

Step 2 - Combine all the resulting binary groups (of 3 digits each) into a
single binary number.

Example
Octal Number : 258
Calculating Binary Equivalent:

Step

Octal Number

Binary Number

Step 1

258

210 510

Step 2

258

0102 1012

Step 3

258

0101012

Octal Number : 258 = Binary Number : 101012


Shortcut method - Binary to Hexadecimal
Steps

Step 1 - Divide the binary digits into groups of four (starting from the right).

Step 2 - Convert each group of four binary digits to one hexadecimal


symbol.

Example
Binary Number : 101012
Calculating hexadecimal Equivalent:
Step

Binary Number

Hexadecimal Number

Step 1

101012

0001 0101

Step 2

101012

110 510

Step 3

101012

1516

Binary Number : 101012 = Hexadecimal Number : 1516

Shortcut method - Hexadecimal to Binary


steps

Step 1 - Convert each hexadecimal digit to a 4 digit binary number (the


hexadecimal digits may be treated as decimal for this conversion).

Step 2 - Combine all the resulting binary groups (of 4 digits each) into a
single binary number.

Example
Hexadecimal Number : 1516
Calculating Binary Equivalent:
Step

Hexadecimal Number

Binary Number

Step 1

1516

110 510

Step 2

1516

00012 01012

Step 3

1516

000101012

Hexadecimal Number : 1516 = Binary Number : 101012

Das könnte Ihnen auch gefallen