Title: Chapter 1.5 The Binary System
1Chapter 1.5 The Binary System
2Basic Concepts Behind the Binary System
- In the decimal system, things are organized into
columns - H T O
- 1 9 3
- such that "H" is the hundreds column, "T" is the
tens column, and "O" is the ones column. So the
number "193" is 1-hundreds plus 9-tens plus
3-ones - ones column meant 100, the tens column meant
101, the hundreds column 102 and so on - the number 193 is really (1102)(9101)(310
0).
3The base ten system
- A. Base ten system (375)
- 3 7 5 Representation
-
- Hundred Ten One
- (102) (101) (100)
- Positions quantity
- Figure 1.15, Page 41
4The base binary system
- A. Base two system (1011)
- 1 0 1 1 Representation
-
- Eight Four Two One
- (23) (22) (21) (20)
- Positions quantity
- Figure 1.15, Page 41
5Basic Concepts Behind the Binary System
- The binary system works under the exact same
principles as the decimal system, only it
operates in base 2 rather than base 10. - In other words, instead of columns being
102101100 they are 222120
6Basic Concepts Behind the Binary System
- Instead of using the digits 0-9, we only use 0
and 1. - Examples What would the binary number 1011 be in
decimal notation? - It would be 230211
- Which will be 82111
7Basic Concepts Behind the Binary System
- Try converting these numbers from binary to
decimal - 10
- 111
- 10101
- 11110
- Remember
- 24 23 22 21 20
8Basic Concepts Behind the Binary System
- Try converting these numbers from binary to
decimal - 10(121) (020) 20 2
- 111 (122) (121) (120) 4217
- 10101 (124) (023) (122) (021)
(120)16040121 - 11110 (124) (123) (122) (121)
(020)16842030
9Basic Concepts Behind the Binary System
- Binary Addition
- Consider the addition of decimal numbers
- 23
- 48
- ___
- We begin by adding 3811. Since 11 is greater
than 10, a one is put into the 10's column
(carried), and a 1 is recorded in the one's
column of the sum. Next, add (24) 1 (the one
is from the carry)7, which is put in the 10's
column of the sum. Thus, the answer is 71.
10Basic Concepts Behind the Binary System
- Binary addition works on the same principle, but
the numerals are different. Begin with one-bit
binary addition - 0 0 1
- 0 1 0
- 0 1 1
11Basic Concepts Behind the Binary System
- 11 carries us into the next column. In decimal
form, 112. In binary, any digit higher than 1
puts us a column to the left (as would 10 in
decimal notation). The decimal number "2" is
written in binary notation as "10"
(121)(020). Record the 0 in the ones column,
and carry the 1 to the twos column to get an
answer of "10." In our vertical notation, - 1
- 1
- 10
12Basic Concepts Behind the Binary System
- Example
- 1010
- 1111
- Step one Column 20 011.Record the 1.
Temporary Result 1 Carry 0 - Step two Column 21 1110. Record the 0,
carry the 1.Temporary Result 01 Carry 1 - Step three Column 22 101 Add 1 from carry
1110. Record the 0, carry the 1.Temporary
Result 001 Carry 1 - Step four Column 23 1110. Add 1 from carry
10111.Record the 11. Final result 11001
13Basic Concepts Behind the Binary System
- Always remember
- 000
- 101
- 1110
14Basic Concepts Behind the Binary System
- Try a few examples of binary addition
- 111110
- 101111
- 111111
15Basic Concepts Behind the Binary System
- Answer
- 1111101101
- 1011111100
- 1111111110
16Basic Concepts Behind the Binary System
- How to find the binary representation of a
positive integer?
17Basic Concepts Behind the Binary System
18Basic Concepts Behind the Binary System
- Example
- 52 in decimal ? 110100 in binary
- What about 10 (1010)? Or other numbers?
19Basic Concepts Behind the Binary System
- To extend binary notation to accommodate
fractional number values, we use a radix point. - 1011.0111
- radix point
20Basic Concepts Behind the Binary System
21Homework 4