Professional Documents
Culture Documents
+, (-, followed by (
(
+, *-, etc. "e will look at a four bit number!
Eight Four Two Units
7owers of
Two
(
)
(
(
(
(
'
8umber '
/ 9 ' / * / ( /
.o ' , 9 0 ' 0 ( 0 , .
Try Question )
2omputer memories are designed to act rather like a set of pigeonholes, or
lockers, in which data is posted. Each location has a uni:ue address, which is
given a number in base ; +, (
*
-, called a *e'decim! or &E+ code.
The first < he/adecimal numbers are like the first < decimal numbers. The
character ' represents decimal ;. .o there have to be alternative characters
for decimal ', , (, ), *, and 6. These are &, %, 2, D, E, and =
respectively. The table shows decimal numbers ' to ; with their four bit binary
and he/adecimal codes!
Decima
l
Four-bit
binary
Hea-
decimal
' '''' '
'''
( ''' (
) '' )
* ''' *
6 '' 6
; '' ;
> ' >
9 ''' 9
< '' <
' '' &
' %
( '' 2
) ' D
* ' E
6 =
; '''' '
The binary code for decimal ; or he/adecimal ' is '''', which is a five bit
number.
&ddress codes of four figures give ;
*
+, ;66);- combinations. In real
computers the addresses can be ;digit codes or even )( digit, which give many
more combinations.
Try Question ,
)-bit Counters
"e can cascade the flip-flops so that we can have as many bits as we want. The
ne/t diagram shows a four bit counter!
This circuit is rising edge triggered, and each flip-flop has its $-bar output fed
back to the data input. The timing diagram shows the idea!
8otice that the unit counter goes through a change every two clock pulses, and
the two?s counter every four pulses. The four?s would be every eight pulses, and
the eight?s every si/teen pulses. If we look at the output of the counter, we would
see it increase by every two clock pulses. This is an up-counter.
Question . "hat is the ma/imum decimal number that this counter can count
to# ANSWER
To make a down-counter, we connect the $-bar output to the 24 input of the
ne/t flip-flop, while the $ output is connected to the data input.
/odu!o N Counters
The *-bit counters we have seen above count from ' to 6 +decimal- before
resetting to @ero. "e say that it is a modu!o 1. counter. The modu!o refers to
the number of states that a counter goes through until it resets to @ero.
& counter with n flip-flops will go through (
n
states before it resets to @ero.
If we want to reset to @ero before that (
n
th state is reached, we need to add an
&8D gate to the circuit and feed the output of the &8D gate to the reset line. The
diagram shows the four bit counter with the &8D gate feeding the reset line!
The counter counts up to binary '' +decimal '-. .ince $ and $) are , the
output of the &8D gate is and that makes the reset line , knocking the counter
back to @ero. This circuit is called a binry coded decim! +%2D- counter. "e
could chose any of the lines. The &8D gate between $( and $) would give us a
modulo ( counter.
Question 0 "hy is the circuit above a Aodulo-( counter# ANSWER
2lick *ere to move on to counter displays.