Changes

Jump to: navigation, search

ULI101 Week 4

22 bytes added, 15:49, 31 August 2017
Hexadecimal Numbers
+ 1 x 2^0 = 1 x 1 = 1
---------------------
Sum of 8 + 4 + 0 + 1 = 13
</pre>
Remember start from the right-hand-side and move to the left. Therefore, <code>1101</code> in binary is <code>13</code> in decimal. For programmers, the 8-bit binary number <code>00001101</code> represents the unsigned integer 13.
+ 1 x 8^0 = 1 x 1 = 1
---------------------
Sum of 1024+448+32+1 = 1505
</pre>
Remember, start from the right-hand-side and move to the left. Therefore, <code>2741</code> in octal is <code>1505</code> in decimal.
2 x 16^1 = 2 x 16^1 = 2 x 16 = 32
A x 16^0 = 10 x 16^0 = 10 x 1 = 10
---------------------------------- Sum of 3840+32+10 = 3882
</pre>
Therefore, <code>F2A</code> in Hexadecimal is <code>3882</code> in decimal. I can understand now how decimal numbers can be stored in the computers as binary numbers, but why are we learning Octal and Hexadecimal numbers? As computers and computer programming languages evolved, octal and hexadecimal numbers were considered “short-hand” a short-cut to represent binary numbers.
221
edits

Navigation menu