This action might not be possible to undo. Are you sure you want to continue?

**Decimal, Binary and Hexadecimal Numbers
**

Nerd Test

If you laugh at this you must be a nerd ☺ Q: Why do computer nerds mix Halloween up with Christmas? A: OCT 31 = DEC 25

**The Decimal Number System – Base 10
**

The decimal numbering system uses 10 symbols from 0 to 9. 0 10 20 1 11 21 2 12 22 3 13 23 4 14 24 5 15 25 6 16 26 7 17 27 8 18 28 9 19 29

**The Hexadecimal Number System – Base 16
**

Where the decimal number system uses 10 symbols (0 to 9), hexadecimal (Hexadecem is Latin for 16) there are 16 symbols. To provide an additional 6 symbols, the letters A to F (or a to f) are used as illustrated below.

0 10 20

1 11 21

2 12 22

3 13 23

4 14 24

5 15 25

6 16 26

7 17 27

8 18 28

9 19 29

A 1A 2A

B 1B 2B

C 1C 2C

D 1D 2D

E 1E 2E

F 1F 2F

**Hex Digits from 00 to FF
**

Where 2 digits for decimal will span from 00 to 99 providing 100 values, two digits for hexadecimal spans from 00 to FF providing 256 values The complete range of hexadecimal values from 00 to FF 0 1 2 3 4 5 6 7 8 9 A B C D E F

10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F Copyright © Colin Lemmon 2004 – 2006, JCU 1/4

50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF

Q: If you and DEAD people can read HEX how many people can read HEX? A: 57006 (#DEAE)

Binary Numbers

"There are 10 kinds of people in the world. Those that understand binary, and those that don’t" Binary is used because it can be represented by on/off, true/false, 1/0 and so on making it simple to implement (in hardware). Binary Decimal Hexadecimal 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F 2/4

Copyright © Colin Lemmon 2004 – 2006, JCU

**Binary to Decimal Conversion
**

10011010 The digits range from lowest order on the right, to highest on the left (like decimal and hex). The decimal value can be calculated by raising 2 to the power of the position or column in which the digit resides. 27 26 25 24 23 22 21 20 Because each value is raised to the power of 2, the value of the column is simply double the value of the next column. The columns above therefore evaluate to the decimal values below. 128 64 32 16 8 4 2 1 Converting the binary number to decimal simply requires the value in the column to be multiplied by the value of the column. As the value in a column can only be 0 or 1, this is very simple. 128 1 64 0 32 0 16 1 8 1 4 0 2 1 1 0

128 + 0 + 0 + 16 + 8 + 0 + 2 + 0 = 154 So the decimal equivalent of 10011010 is 154.

**Decimal to Binary Conversion
**

Decimal to binary conversion requires that we move from the highest value column (left) to the lowest value column (right) and check whether we need a 1 in that column (if the decimal value of the column fits into the number remaining), and if so, we subtract the value of the column from the value, continuing until the whole number is represented. For example convert the value 78 to binary: 78 128s 0 78 64s 1 78 – 64 = 14 (14 left to represent) 32s 0 14 16s 0 14 8s 1 14 – 8 = 6 4s 1 6–4=2 2s 1 2–2=0 (finished with 1s, but we must fill every column to the right) 1s 0 0 So, the binary equivalent of 78 is 01001110.

Copyright © Colin Lemmon 2004 – 2006, JCU

3/4

**Converting Between Binary and Hex
**

Converting Binary to hex and hex to binary is quite simple, as each hex digit (0-15) is the same as 4 binary digits: 0000 to 1111 is also 0 to 15. Converting binary to hex requires that the binary number is broken up into blocks of 4 digits and the corresponding hex digit of 0 – F is substituted from the table below. Example, convert the binary value 0101010 to hex: 0010 2 1010 A

Converting from hex to binary is done in the same way. For example convert the hex value B6 to binary. B 1011 6 0110 Binary Hexadecimal 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 A B C D E F

**Using Hex Numbers in Code
**

In C/C++, hex numbers are preceded by the sequence 0x (zero and x). Note that the digits A to F can be upper or lower case. int value = 0xB6; is the same as int value = 182; Copyright © Colin Lemmon 2004 – 2006, JCU 4/4

- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- DEMULTI PLEXER AND MULTIOLEXER
- COUNTER
- COUNTER
- COUNTER
- COUNTER
- COUNTER
- COUNTER
- COUNTER
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY
- CODE AND PERITY

- COUNTER
- COUNTER
- DEMULTI PLEXER AND MULTIOLEXER
- Digital Notes
- Base Conversion
- Design 2
- computer architecture
- 01.NumberSystems
- Sarita Lecture
- numsys
- TI-Nspire CAS Reference Guide
- Chapter 33
- Digital Electronics & Microprocessors
- 1
- Binary of Prime Numbers
- Mst121 Chapter a0
- Yearly Plan Maths Year 6 2012
- Number Systems
- Davies 46
- Sicilian Sacrifice - Chess Cafe
- 1279209577
- Chess Rules
- Caro Kann with Be3.pdf
- Mtap Session 1 July 27
- Skewer (Chess)
- Rules of Chess - Frequent Asked Questions
- How to Win at Chess Quickly - Ebcafe05
- Chess Off-Broadway Transcript
- Kasparov Losing the Title and Aftermath
- mueller04.pdf

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd