Numbering Systems
The binary and hexidecimal numbering systems have always presented a huge problem for most students. Actually, if I look through the different computer books and study material that try to explain the subject, its really no wonder. I have found information that explains it using boxes, building blocks, candles, cars.... I have no idea what this is myself. In fact, just as you start to think you've got a handle on it, you read another explanation that tends to confuse you entirely. So, at the risk of baffling you completely, I'll try to explain, using another method, the method my grade 2 teacher (or maybe grade 3, I can't remember) taught me to understand decimal numbers of more than 1 digit. This doesn't work so well for hexidecimal, because the numbers get real large real quick. But we can check it out.
First thing to remember... is that you don't need to learn to count. Unless you're attempting to understand low level programming, learning binary provides you with two things:
- comprehension of how your computer stores information, with a better understanding of bits, bytes, kilobytes, etc...
- an easy method of converting between decimal and hexidecimal. You don't have to learn to count in hexidecimal either, but I/O addresses and memory addresses are given in hex and sometimes you can resolve device conflicts by being able to tell if addresses overlap.
- comprehension of how your computer stores information, with a better understanding of bits, bytes, kilobytes, etc...
- an easy method of converting between decimal and hexidecimal. You don't have to learn to count in hexidecimal either, but I/O addresses and memory addresses are given in hex and sometimes you can resolve device conflicts by being able to tell if addresses overlap.
So, my suggestion is to find a conversion method that you can understand, bookmark it or keep it in a file, then forget about it. Look it up again on the rare occasion that you might need it. (By the way, my favorite conversion method is a calculator).
All that being said, lets get back to grade 2.
Decimal (base 10)
The decimal numbering system is the system we all use in our everyday work. It consists of 10 digits (hence the name decimal). The digits, from smallest to largest are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Now, any number can be broken down into columns. From right to left, the first column is the 1's column, then the 10's column, then the 100's, then the 1000's, etc..
Let's look at the number 137:
Let's look at the number 137:
Thousands | Hundreds | Tens | Ones |
0 | 1 | 3 | 7 |
0 X 1000 = 0 (0 thousands)
1 X 100 = 100 (1 hundreds)
3 X 10 = 30 (3 tens)
7 X 1 = 7 (7 ones)
0+100 + 30 + 7 = 137
If you don't understand it this far, go back over it until you do, or get some help.
OK, lets try the number 77:
Thousands | Hundreds | Tens | Ones |
0 | 0 | 7 | 7 |
0 X 1000 = 0 (0 thousands)
0 X 100 = 0 (0 hundreds)
7 X 10 = 70 (7 tens)
7 X 1 = 7 (7 ones)
0+0+70 + 7 = 77
Binary (base 2)
Your computer works using the binary numbering system. This is because a computer can only recognize two states, the presence of an electrical charge or the absence of an electrical charge. In other words, on or off.
The binary numbering system is ideal for representing these two states because it consists of only two digits. The digits, from smallest to largest are:
0, 1.
0, 1.
0 represents the absence of an electrical charge or 'off'.
1 represents the presence of an electrical charge or 'on'.
(Now you can understand why the power switch on your computer is labelled as O/1).
1 represents the presence of an electrical charge or 'on'.
(Now you can understand why the power switch on your computer is labelled as O/1).
Once again, any number can be broken down into columns. Each column is a placeholder. Using the binary numbering system, from right to left, the first column is the 1's column, then the 2's column, then the 4's, then the 8's, then the 16's column, then the 32's column, etc..
Let's look at the number 137 again:
Let's look at the number 137 again:
One hundred twenty-eights | Sixty- fours | Thirty- twos | Sixteens | Eights | Fours | Twos | Ones |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
1 X 128 = 128 (1 one hundred twenty-eights)
0 X 64 = 0 (0 sixty-fours)
0 X 32 = 0 (0 thirty-twos)
0 X 16 =0 (0 sixteens)
1 X 8 = 8 (1 eights)
0 X 4 = 0 (0 fours)
0 X 2 = 0 (0 twos)
1 X 1 = 1 (1 ones)
0 X 64 = 0 (0 sixty-fours)
0 X 32 = 0 (0 thirty-twos)
0 X 16 =0 (0 sixteens)
1 X 8 = 8 (1 eights)
0 X 4 = 0 (0 fours)
0 X 2 = 0 (0 twos)
1 X 1 = 1 (1 ones)
128 + 0 + 0 + 0 + 8 + 0 + 0 + 1 = 137
Thus, the binary number 10001001 is equal to 137 decimal.
Thus, the binary number 10001001 is equal to 137 decimal.
A single digit (0 or 1) is called a 'bit' (binary digit).
The table above contains 8 bits. Each column can contain either a 1 or a 0 ( 'cause there is only 2 digits in the binary numbering system). So, as you can see, it takes 8 bits to represent the decimal number 137.
The table above contains 8 bits. Each column can contain either a 1 or a 0 ( 'cause there is only 2 digits in the binary numbering system). So, as you can see, it takes 8 bits to represent the decimal number 137.
Make sense?
If you don't understand it this far, go back over it until you do, or get some help.
If you don't understand it this far, go back over it until you do, or get some help.
OK, lets try the number 77:
One hundred twenty-eights | Sixty- fours | Thirty- twos | Sixteens | Eights | Fours | Twos | Ones |
0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
0 X 128 = 0 (0 one hundred twenty-eights)
1 X 64 = 64 (1 sixty-fours)
0 X 32 = 0 (0 thirty-twos)
0 X 16 =0 (0 sixteens)
1 X 8 = 8 (1 eights)
1 X 4 = 4 (1 fours)
0 X 2 = 0 (0 twos)
1 X 1 = 1 (1 ones)
1 X 64 = 64 (1 sixty-fours)
0 X 32 = 0 (0 thirty-twos)
0 X 16 =0 (0 sixteens)
1 X 8 = 8 (1 eights)
1 X 4 = 4 (1 fours)
0 X 2 = 0 (0 twos)
1 X 1 = 1 (1 ones)
0 + 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77
Thus, the binary number 01001101 is equal to 77 decimal.
Thus, the binary number 01001101 is equal to 77 decimal.
Any character that you type (including spaces), and any character you can see on your screen, takes 8 bits for your computer to produce.Eight bits associated together are called a 'byte'. A byte is the real building block of computer information. This can form a single character. A character can be a number, letter, or symbol. The amount of information a device can store is measured in bytes. Because of this, most numbers and sizes reported by the computer are evenly divisible by 8.
Multiple bytes associated together are often called a 'word'.
8 bits = 1 byte
1024 bytes = 1 kilobyte (Kb)
1024 kilobytes = 1 megabyte (Mb) (1,048,576 characters or bytes)
1024 megabytes = 1 gigabyte (Gb)
Multiple bytes associated together are often called a 'word'.
8 bits = 1 byte
1024 bytes = 1 kilobyte (Kb)
1024 kilobytes = 1 megabyte (Mb) (1,048,576 characters or bytes)
1024 megabytes = 1 gigabyte (Gb)
These numbers are often rounded off for ease of calculation.
You might see 1 megabyte represented as a million bytes (1,000,000 characters), or 1000 kilobytes.
You might see 1 megabyte represented as a million bytes (1,000,000 characters), or 1000 kilobytes.
|
Decimal | 100,000 | 10,000 | 1,000 | 100 | 10 | 1 |
Binary | 512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Hexidecimal | 65,536 | 4,096 | 256 | 16 | 1 |
You didn't think you were getting away that easy, did you? You have to do a little practise before you can lock it away entirely!
The digit values are above and your chart is down below. See if you can fill in the missing values.
The digit values are above and your chart is down below. See if you can fill in the missing values.
Decimal | Hex | Binary |
0 | 0 | 0000 |
1 | 1 | 0001 |
2 | 2 | 0010 |
3 | 3 | 0011 |
4 | 4 | 0100 |
5 | 5 | 0101 |
6 | 6 | 0110 |
7 | 7 | 0111 |
8 | 8 | 1000 |
9 | 9 | 1001 |
10 | A | 1010 |
11 | B | 1011 |
12 | C | 1100 |
13 | D | 1101 |
14 | E | 1110 |
15 | F | 1111 |
Decimal | Hex | Binary | ||
163 | ? | 10100011 | ||
? | 2Fh | ? | ||
? | 30h | 00110000 | ||
3840 | ? | ? | ||
? | ? | 10000000000 | ||
? | 4ACh | ? | ||
Decimal | Hex | Binary | ||
163 | A3h | 10100011 | ||
47 | 2Fh | 00101111 | ||
48 | 30h | 00110000 | ||
3840 | F00h | 111100000000 | ||
1024 | 400h | 10000000000 | ||
1196 | 4ACh | 010010101100 | ||
|
Thank you, I have recently been looking for info approximately this subject for
ReplyDeleteages and yours is the best I have found out till now.
But, what concerning the bottom line? Are you
sure concerning the supply?
My homepage ... CT limo
You will enjoy its fascinating gameplay.
ReplyDelete