Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Counting: importance
1. Counting: importance
2. Importance
Why is counting important?
3. Counting
In English class, spelling words is fundamental (as is grammar which builds on words).
In music class, notes, scales, sharps, flats, etc., are fundamental.
In sporting events, skills for that sport are fundamental. Some volleyball skills: serve, bump, set, spike, block.
In computer class, counting is a fundamental skill.
4. Counting
Computer people often start counting at
0 and not at
1.
The first decimal number is 0.
The second decimal number is 1.
The third decimal number is 2.
... and so on ...
5. Number representation
There is a difference between a value and a representation of a value.
The value is an abstract idea. A representation is a way to make the value (in reality) concrete.
Base 10, or decimal, uses 10 digits, and is human friendly.
Base 2, or binary, uses 2 digits, and is machine friendly.
Base 16, or hexadecimal, uses 16 digits, and is partly human, partly machine friendly.
Base 8, or octal, uses 8 digits, but unlike hexadecimal, is not used very much anymore.
6. Base 10 digits
Base
10 uses
10 digits, from
0 to
9.
0 1 2 3 4 5 6 7 8 9
Question: What base
10 number comes after
9?
7. Base 10 digits
In base 10, the number 10 comes after 9.
Question: What rule is used to go from 9 to 10?
8. Addition with carry
The
9 goes to
0, with a carry of
1 in the next decimal place.
1
9
+ 1
----
1 0
In base ten, adding
1 to
9 is
0 with a carry of
1, which is brought down to get
10, or ten.
Note:
9 is the tenth and last digit in base 10.
9. Decimal numbers
Consider the number
156.
156
= 100 + 50 + 6
= 1*100 + 5*10 + 6*1
= 1*102 + 5*101 + 6*100
10. Decimal digits
This positional number system, or Arabic numbering system, is much better than the previously used Roman numeral system.
Digit 0, for 100, or 1, is the first digit.
Digit 1, for 101, or 10, is the second digit.
Digit 2, for 102, or 100, is the third digit.
Digit 3, for 103, or 1000, is the fourth digit.
Digit 4, for 104, or 10000, is the fifth digit.
How much difference does it make on a bank check when you add one zero:
$1,
$10,
$100,
$1,000,
$10,000, etc.
11. Base 16 digits
Base
16 uses
16 digits, where
0 to
9 are the first
10 digits.
0 1 2 3 4
5 6 7 8 9
Question: After
9, what are the other
6 hexadecimal digits?
12. Base 16 digits
The
6 hexadecimal digits after
9 are
A,
B,
C,
D,
E and
F
So base
16 uses
16 digits, where
A,
B,
C,
D,
E, and
F have decimal values
10 through
15.
0 1 2 3
4 5 6 7
8 9 A B
C D E F
13. Network card addresses
A network adapter card is used to connect a computer to a network.
Manufacturer's of network adapter cards have arranged for every network card has an address that is unique.
Network adapter card addresses are expressed in hexadecimal, such as 08-00-5A-E4-2B-F7.
Question: What base 16 number comes after F?
14. Base 16
In base 16, the number after F is 10.
Question: What rule is used to go from F to 10 in base 16?
15. Addition with carry
The
F goes to
0, with a carry of
1 in the next hexadecimal place.
1
F
+ 1
----
1 0
In base sixteen, adding
1 to
F is
0 with a carry of
1, which is brought down to get
10, or one-zero hex, or sixteen decimal.
Note:
F is the sixteenth and last digit in base
16.
16. Base 2 digits
Base
2 uses
2 digits.
0
1
Question: What base
2 number comes after
1?
The base
2 number after
1 is
10.
Question: What rule is used?
17. Addition with carry
The
1 goes to
0, with a carry of
1.
1
1
+ 1
----
1 0
In base two, adding
1 to
1 is
0 with a carry of
1, which is brought down to get
10, or one-zero binary, or two decimal.
Note:
1 is the second and last digit in base 2.
18. Which base?
1 1 1
9 F 1
+ 1 + 1 + 1
--- --- ---
1 0 1 0 1 0
When more than one base is being used, what is
10?
19. Base suffix's
When multiple bases are being used, add a suffix to the number to indicate the base of the number.
1d is one in decimal (the default).
1h is one in hexadecimal, or hex.
1b is one in binary.
Note that the abstract notion of "
one" does not change and is independent of the base in which the idea is expressed.
20. Which base?
So the ambiguity can be resolved using a suffix.
1 1 1
9 d F h 1 b
+ 1 d + 1 h + 1 b
----- ----- ----
1 0 d 1 0 h 1 0 b
10d is ten,
10h is sixteen, and
10b is two.
Note: Programming language notation may differ as to how to specify the base to be used.
21. Bit values
Question: How many values can be represented with 1 bit?
22. Bit values
2 values can be represented with 1 bit
1 bit can represent any 2 values, but not more than 2, and everyone using and communicating using those bits must agree on what those 2 values are.
23. 1 bit
1 bit can represent
2 values:
present for class (1b)
absent from class (0b)
What if you are late to class. That cannot be represented with one bit unless one of the above two values is not used.
24. 2 bits
2 bits can represent
4 values:
present for class (11b)
late for class (01b)
departed early (10b)
absent from class (00b)
Note: If you leave for an extended period of time in the middle of class, then this might be approximated by marking you either "
late for class" or "
departed early" as there are not enough bits used to handle more than
4 cases.
25. End of page
26. Multiple choice questions for this page
13 questions omitted (login required)