An Application Leaming to count in binary will help you to basically understand how digital circuits can be used to count events. Let's take a simple example of counting tennis balls going into a box from a conveyor belt. Assume that nine balls are to go into each box. The counter in Figure 2-1 counts the pulses from a sensor that detects the passing of a ball and produces a sequence of logic levels (digital waveforms) on each of its four par- allel outputs. Each set of logic levels represents a 4-bit binary number (HIGH = 1 and LOW = 0), as indicated. As the decoder receives these waveforms, it decodes each set of four bits and converts it to the corresponding decimal number in the 7-segment display. When the counter gets to the binary state of 1001, it has counted nine tennis balls, the dis- play shows decimal 9, and a new box is moved under the conveyor belt. Then the counter goes back to its zero state (0000), and the process starts over. (The number 9 was used only in the interest of single-digit simplicity.) Ball count 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 1st ball 2nd hall Counter 9th ball 111 0 1 0 Binary Numbers 0 1 Decoder 0 0 1 1 0 0 1 1 0 0 0000 1 0 0 00 0 1 1 LO 0123456789 FIGURE 2-1 Illustration of a simple binary counting application. The Weighting Structure of Binary Numbers A binary number is a weighted number. The right-most bit is the LSB (least significant bit) in a binary whole number and has a weight of 2° 1. The weights increase from right to left by a power of two for each bit. The left-most bit is the MSB (most significant bit); its weight depends on the size of the binary number. Fractional numbers can also be represented in binary by placing bits to the right of the binary point, just as fractional decimal digits are placed to the right of the decimal point. The left-most bit is the MSB in a binary fractional number and has a weight of 2 = 0.5. The fractional weights decrease from left to right by a negative power of two for each bit. The weight structure of a binary number is 21 23 22 21 20 21 22 ... 2 Binary point where n is the number of bits from the binary point. Thus, all the bits to the left of the binary point have weights that are positive powers of two, as previously discussed for whole numbers. All bits to the right of the binary point have weights that are negative powers of two, or fractional weights. The powers of two and their equivalent decimal weights for an 8-bit binary whole num- ber and a 6-bit binary fractional number are shown in Table 2-2. Notice that the weight doubles for each positive power of two and that the weight is halved for each negative power of two. You can easily extend the table by doubling the weight of the most signifi- cant positive power of two and halving the weight of the least significant negative power of two; for example, 2° 512 and 27 0.0078125. The weight or value of a bit increases from right to left in a binary number. InfoNote Processors use binary numbers to select memory locations. Each location is assigned a unique number called an address. Some microprocessors, for example, have 32 address lines which can select 232 (4,294,967,296) unique locations. Number Systems, Operations, and Codes TABLE 2-2 Binary weights. Positive Powers of Two Negative Powers of Two (Whole Numbers) (Fractional Number) 2 27 26 25 24 23 22 2¹ 20 2-1 2-2 2-3 2-4 2-5 2-6 256 128 64 32 16 8 2 1/2 1/4 1/8 1/16 1/32 1/64 0.5 0.25 0.125 0.625 0.03125 0.015625 Add the weights of all 1s in a binary number to get the decimal value. Binary-to-Decimal Conversion The decimal value of any binary number can be found by adding the weights of all bits that are 1 and discarding the weights of all bits that are 0. EXAMPLE 2-3 Convert the binary whole number 1101101 to decimal. Solution Determine the weight of each bit that is a 1, and then find the sum of the weights to get the decimal number. Weight: 26 25 24 23 2² 2' 20 Binary number: 1101101 1101101 = 26+25+23 +22 + 20 64 +32 +8 + 4 + 1 = 109 Related Problem Convert the binary number 10010001 to decimal.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter4: Making Decisions
Section: Chapter Questions
Problem 4RQ
icon
Related questions
Question

Counting ten tennis ball going into a box From a conveyor belt 

I want to write a assignment about this topic

An Application
Leaming to count in binary will help you to basically understand how digital circuits can
be used to count events. Let's take a simple example of counting tennis balls going into a
box from a conveyor belt. Assume that nine balls are to go into each box.
The counter in Figure 2-1 counts the pulses from a sensor that detects the passing of a
ball and produces a sequence of logic levels (digital waveforms) on each of its four par-
allel outputs. Each set of logic levels represents a 4-bit binary number (HIGH = 1 and
LOW = 0), as indicated. As the decoder receives these waveforms, it decodes each set of
four bits and converts it to the corresponding decimal number in the 7-segment display.
When the counter gets to the binary state of 1001, it has counted nine tennis balls, the dis-
play shows decimal 9, and a new box is moved under the conveyor belt. Then the counter
goes back to its zero state (0000), and the process starts over. (The number 9 was used only
in the interest of single-digit simplicity.)
Ball count 1st 2nd 3rd 4th 5th 6th 7th 8th 9th
1st ball
2nd hall
Counter
9th ball
111
0 1
0
Binary Numbers
0 1
Decoder
0
0 1
1
0
0
1
1
0
0
0000
1
0
0
00 0
1
1
LO
0123456789
FIGURE 2-1 Illustration of a simple binary counting application.
The Weighting Structure of Binary Numbers
A binary number is a weighted number. The right-most bit is the LSB (least significant bit)
in a binary whole number and has a weight of 2° 1. The weights increase from right to
left by a power of two for each bit. The left-most bit is the MSB (most significant bit); its
weight depends on the size of the binary number.
Fractional numbers can also be represented in binary by placing bits to the right of the
binary point, just as fractional decimal digits are placed to the right of the decimal point.
The left-most bit is the MSB in a binary fractional number and has a weight of 2 = 0.5.
The fractional weights decrease from left to right by a negative power of two for each bit.
The weight structure of a binary number is
21 23 22 21 20 21 22 ... 2
Binary point
where n is the number of bits from the binary point. Thus, all the bits to the left of the
binary point have weights that are positive powers of two, as previously discussed for whole
numbers. All bits to the right of the binary point have weights that are negative powers of
two, or fractional weights.
The powers of two and their equivalent decimal weights for an 8-bit binary whole num-
ber and a 6-bit binary fractional number are shown in Table 2-2. Notice that the weight
doubles for each positive power of two and that the weight is halved for each negative
power of two. You can easily extend the table by doubling the weight of the most signifi-
cant positive power of two and halving the weight of the least significant negative power of
two; for example, 2° 512 and 27 0.0078125.
The weight or value of a bit increases
from right to left in a binary number.
InfoNote
Processors use binary numbers
to select memory locations. Each
location is assigned a unique
number called an address. Some
microprocessors, for example,
have 32 address lines which can
select 232 (4,294,967,296) unique
locations.
Number Systems, Operations, and Codes
TABLE 2-2
Binary weights.
Positive Powers of Two
Negative Powers of Two
(Whole Numbers)
(Fractional Number)
2
27
26
25
24 23 22
2¹
20
2-1
2-2
2-3
2-4
2-5
2-6
256
128
64
32
16
8
2
1/2
1/4
1/8
1/16
1/32
1/64
0.5
0.25
0.125
0.625
0.03125 0.015625
Add the weights of all 1s in a binary
number to get the decimal value.
Binary-to-Decimal Conversion
The decimal value of any binary number can be found by adding the weights of all bits that
are 1 and discarding the weights of all bits that are 0.
EXAMPLE 2-3
Convert the binary whole number 1101101 to decimal.
Solution
Determine the weight of each bit that is a 1, and then find the sum of the weights to get
the decimal number.
Weight: 26 25 24 23 2² 2' 20
Binary number: 1101101
1101101 = 26+25+23 +22 + 20
64 +32 +8 + 4 + 1 = 109
Related Problem
Convert the binary number 10010001 to decimal.
Transcribed Image Text:An Application Leaming to count in binary will help you to basically understand how digital circuits can be used to count events. Let's take a simple example of counting tennis balls going into a box from a conveyor belt. Assume that nine balls are to go into each box. The counter in Figure 2-1 counts the pulses from a sensor that detects the passing of a ball and produces a sequence of logic levels (digital waveforms) on each of its four par- allel outputs. Each set of logic levels represents a 4-bit binary number (HIGH = 1 and LOW = 0), as indicated. As the decoder receives these waveforms, it decodes each set of four bits and converts it to the corresponding decimal number in the 7-segment display. When the counter gets to the binary state of 1001, it has counted nine tennis balls, the dis- play shows decimal 9, and a new box is moved under the conveyor belt. Then the counter goes back to its zero state (0000), and the process starts over. (The number 9 was used only in the interest of single-digit simplicity.) Ball count 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 1st ball 2nd hall Counter 9th ball 111 0 1 0 Binary Numbers 0 1 Decoder 0 0 1 1 0 0 1 1 0 0 0000 1 0 0 00 0 1 1 LO 0123456789 FIGURE 2-1 Illustration of a simple binary counting application. The Weighting Structure of Binary Numbers A binary number is a weighted number. The right-most bit is the LSB (least significant bit) in a binary whole number and has a weight of 2° 1. The weights increase from right to left by a power of two for each bit. The left-most bit is the MSB (most significant bit); its weight depends on the size of the binary number. Fractional numbers can also be represented in binary by placing bits to the right of the binary point, just as fractional decimal digits are placed to the right of the decimal point. The left-most bit is the MSB in a binary fractional number and has a weight of 2 = 0.5. The fractional weights decrease from left to right by a negative power of two for each bit. The weight structure of a binary number is 21 23 22 21 20 21 22 ... 2 Binary point where n is the number of bits from the binary point. Thus, all the bits to the left of the binary point have weights that are positive powers of two, as previously discussed for whole numbers. All bits to the right of the binary point have weights that are negative powers of two, or fractional weights. The powers of two and their equivalent decimal weights for an 8-bit binary whole num- ber and a 6-bit binary fractional number are shown in Table 2-2. Notice that the weight doubles for each positive power of two and that the weight is halved for each negative power of two. You can easily extend the table by doubling the weight of the most signifi- cant positive power of two and halving the weight of the least significant negative power of two; for example, 2° 512 and 27 0.0078125. The weight or value of a bit increases from right to left in a binary number. InfoNote Processors use binary numbers to select memory locations. Each location is assigned a unique number called an address. Some microprocessors, for example, have 32 address lines which can select 232 (4,294,967,296) unique locations. Number Systems, Operations, and Codes TABLE 2-2 Binary weights. Positive Powers of Two Negative Powers of Two (Whole Numbers) (Fractional Number) 2 27 26 25 24 23 22 2¹ 20 2-1 2-2 2-3 2-4 2-5 2-6 256 128 64 32 16 8 2 1/2 1/4 1/8 1/16 1/32 1/64 0.5 0.25 0.125 0.625 0.03125 0.015625 Add the weights of all 1s in a binary number to get the decimal value. Binary-to-Decimal Conversion The decimal value of any binary number can be found by adding the weights of all bits that are 1 and discarding the weights of all bits that are 0. EXAMPLE 2-3 Convert the binary whole number 1101101 to decimal. Solution Determine the weight of each bit that is a 1, and then find the sum of the weights to get the decimal number. Weight: 26 25 24 23 2² 2' 20 Binary number: 1101101 1101101 = 26+25+23 +22 + 20 64 +32 +8 + 4 + 1 = 109 Related Problem Convert the binary number 10010001 to decimal.
Expert Solution
steps

Step by step

Solved in 6 steps

Blurred answer
Similar questions
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole