What Is Number
What Is Number
GROUP 4
JOANNA S. TURQUEZA
SUNSHINE F. FRIGILLANA
VERONICA M. HOLASCA
WHAT IS NUMBER SYSTEM
Divide the decimal number by the desired target radix (2, 8, or 16).
224 ÷8= 28 0 00
28 ÷8= 3 4 400
3 ÷8= 0 3 3400
0 done.
DECIMAL TO HEXADECIMAL
Here is an example of using repeated division to convert 1792 decimal to hexadecimal:
Hexadecimal
Decimal Number Operation Quotient Remainder
Result
1792 ÷ 16 = 112 0 0
112 ÷ 16 = 7 0 00
7 ÷ 16 = 0 7 700
0 done.
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.
Decimal: 0 1 2 3 4 5 6 7
Hexadecimal: 0 1 2 3 4 5 6 7
Decimal: 8 9 10 11 12 13 14 15
Hexadecimal: 8 9 A B C D E F
THE ADDITION OF LETTERS CAN MAKE FOR FUNNY HEXADECIMAL
VALUES. FOR EXAMPLE, 48879 DECIMAL CONVERTED TO HEX IS:
Hexadecimal
Decimal Number Operation Quotient Remainder
Result
48879 ÷ 16 = 3054 15 F
3054 ÷ 16 = 190 14 EF
190 ÷ 16 = 11 14 EEF
11 ÷ 16 = 0 11 BEEF
0 done.
Other fun hexadecimal numbers include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD,
DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, C0FFEE, FED, FEED, FACE,
BAD, F00D, and my initials DAC.
BINARY NUMBER SYSTEM
An easy way to convert from binary to octal is to group binary digits into
sets of three, starting with the least significant (rightmost) digits.
Binary:
11 100 101
11100101 =
Octal: 0 1 2 3 4 5 6 7
Hexadecimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
11100000000 +1 1 ×2 2
1100000000 +1 3 ×2 6
100000000 +1 7 ×2 14
00000000 +0 14 ×2 28
0000000 +0 28 ×2 56
000000 +0 56 ×2 112
00000 +0 112 ×2 224
0000 +0 224 ×2 448
000 +0 448 ×2 896
00 +0 896 ×2 1792
0 +0 1792 done.
OCTAL NUMBER SYSTEM
Octal to Binary
Converting from octal to binary is as easy as converting from binary to octal. Simply
look up each octal digit to obtain the equivalent group of three binary digits.
Octal: 0 1 2 3 4 5 6 7
Octal = 3 4 5
= 011100101
Binary = 011 100 101
binary
OCTAL TO HEXADECIMAL
Drop any leading zeros or pad with leading zeros to get groups
of four binary digits (bits):
Binary 011100101 = 1110 0101
Therefore, through a two-step conversion process, octal
345 equals binary 011100101 equals hexadecimal E5.
Then, look up the groups in a table to convert to hexadecimal digits.
Hexadecimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
Hexadecimal = E 5 = E5 hex
• Remove the most significant octal digit (leftmost) and add it to the result.
• Go to step 2.
Hexadeci
0 1 2 3 4 5 6 7
mal:
01
Binary: 0000 0001 0010 0011 0100 0110 0111
01
Hexad
8 9 A B C D E F
ecimal:
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal = A 2 D E
=
Binary = 1010 0010 1101 1110 101000101101
1110 binary
HEXADECIMAL TO OCTAL
• When converting from hexadecimal to octal, it is often easier to first convert the hexadecimal number into
binary and then from binary into octal. For example, to convert A2DE hex into octal:
• (from the previous example)
Hexadecimal = A 2 D E
=
Binary = 1010 0010 1101 1110 10100010110111
10 binary
Hexadecimal: 0 1 2 3 4 5 6 7
Decimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
Decimal: 8 9 10 11 12 13 14 15
A2DE hexadecimal:
= ((A) * 163) + (2 * 162) + ((D) * 161) + ((E) * 160)
= (10 * 163) + (2 * 162) + (13 * 161) + (14 * 160)
= (10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1)
= 40960 + 512 + 208 + 14
= 41694 decimal
ALGORITHM
• What Is an Algorithm?
• An algorithm is a finite list of instructions, most often used in solving problems
or performing tasks. You may have heard the term used in some fancy context
about a genius using an algorithm to do something highly complex, usually in
programming. Indeed, you've most likely heard the term used to explain most
things related to computer processes. However, what would you say if I was to
tell you that there is a very good chance that you, yourself, have followed an
algorithm? You may have followed some algorithms hundreds or thousands of
times!
FLOWCHART
• What is a Flowchart?
• Flowcharts are graphical representation of steps. It was
originated from computer science as a tool for representing
algorithms and programming logic, but had extended to use
in all other kinds of processes. Nowadays, flowcharts play an
extremely important role in displaying information and
assisting reasoning. They help us visualize complex processes,
or make explicit the structure of problems and tasks. A
flowchart can also be used to define a process or project to
be implemented.