so in our previous video on how memory
worked we got to the point from storing
one bit of information that we could set
or reset it to the flip-flop where we
could store a bit of information and
then we arranged four of them together
in parallel so we could store four bits
of information so what we did we had
four inputs DN to D3 which gave us our
input and four outputs Q to Q3 which
gave us our output and we connected for
each of the flip-flops the clock input
together so that when we strob this
input it stored all the information on
the data inputs and presented it out at
the output this has still only allowed
us to store one piece of information it
was a bigger piece we could store here a
number between not and 15 or if we use
two's complement between minus 8 and 7
but it was still only one piece of
information so we're going to look at
now is how we can arrange flip-flops so
we can
store more than one piece of
information so actually if you're
implementing a membership like this one
which which is a 8K by 8bit memory chip
you wouldn't use flipflops as we've seen
them before you'd actually arrange about
six transistors to store each bit just
so that you can fit more onto the actual
silicon if you put flipflops as we
design them on they take up more space
also we're not going to consider like
this is an 8 bit wide bit of memory or
bite wide memory we'll still consider
one bit so we're only going to store one
bit of information but we're going to
store multiple different bits if you did
want to store eight bits of information
you could just have eight chips one for
each bit that you wanted to store so I'm
just going to use the flip-flop symbol
that we had before to represent it so
we' got our data input which we'll call
D we' got our output Q we've also got
the inverted Q output and we have our
clock input as well that we can use to
tell it to store it so whatever is on
the input is stored in the flip problem
goes to the output when we take this low
and then take it high again or vice
versa depending on how it's actually
built now we want to store more than one
bit of information so what I'm going to
do is I'm going to store two bits of
information so I have another flip-flop
exactly the same so now we have two bits
of information now there's several
things we need to do we want to have one
input to our system so we have one data
bit that we're going to store and we
want to be able to choose whether we
store it in this flip-flop or in that
flipflop well the first thing we need is
some way of saying which flipflops value
we're actually interested in storing the
CPU refers to every single memory
location by a unique identifier but
rather than having a name like we get in
the programming language the computer
uses a binary number to refer to each
memory location this is what we would
call the address so in this case I'm
going to say this is at address zero and
this one is at address one so now I want
to be able to access either this one or
this one well first thing I'm going to
do is I'm going to have a data input
which I'm going to call D
in here and that's where we're going to
put our signal now if we think about how
flip-flop Works they only change the
value they store when we strobe the
clock input so actually we can connect
the input directly to the input of the
first flip-flop and we can also connect
it directly to the input of the second
flip-flop like so so how do we choose
which one we want to St in well we could
have in this case two strobe lines and
just strobe the right one well that
would work fine for two bits and it
wouldn't be too bad if we had four
flip-flops but if you think about it if
you've got 64 kilobits of memory that's
65,536 different wires and so it gets
unmanageable when you get to high
numbers so what we do is we say well
actually we're going to have an input
which we'll call a in the address input
and if this is zero then we're going to
refer to this one and if this contains
one we're going to refer to this one
we'll also have a signal
W which we'll use to say we want to
write whatever bit is in D in to
whichever flip-flop is specified by a in
so what we want to do is to be able to
strobe the input to the zero flip-flops
clock pin when a in contains zero and W
is strobed or strobe the input on one
flip-flop when a in contains one and W
is strob so we need to connect via
digital logic again these inputs to the
clock input of flip zero or the clock
input of flip-flop one and to do that we
use our old friend the and gate again
going to start with flip-flop one
because it's the simpler one to think
about how we do this we want this clock
input to be strobed when w is strobed
and a in contains a one and so the
easiest way to do that if remember our
and Gates and you can look back at some
of the videos on number file if you
forgotten about them up here this is a
and gate so if we put an and gate in
here we draw that like so now if we
think about an and gate again it's got
two inputs A and B and an output which
again we'll use Q so if we look here we
see that whenever a is one the output
matches B so when a is one and B is zero
the output is zero when a is one and B
is one the output is one so we can use
this fact of these values here in our
circuit here we want clock to be
whatever the value of w is which we've
connected to input B on the hand gate
whenever the input a in is one so we can
just connect that line directly in like
that and so now whenever we strobe W the
clock input on flip-flop one will only
be strobed if a in contains one or the
address one now how do we do the same
for flip-flop zero well we want the same
thing to happen so I should bring my
wires down here so so what we need to do
now is work out what are going to be the
right inputs for A and B on this
handgate now the input for B is easy
because it's exactly the same as this
one here the W signal the right signal
the same we want to write it we just
bring this down and connect it up but we
need this thing to be one whenever a in
is zero so the way we do that again
remembering in digital logic is that we
use a simple notot gate like this which
just inverts it so when the input to the
not gate is zero the output is one when
the input to the not gate is one the
output is zero so we can connect this in
like so and so now what we've got said
up is that we've got three inputs W it
says when we want to write something to
our flipflops D in which contains the
value we want to write and a in which
tells us whether we want to write to
flipflop zero or flip-flop one depending
on the value of zero or one in a in we
either store the value in that one
or we store it in that one and of course
you can expand this up to complicated
draid but if you wanted to store say
four you'd have two a inputs so you have
a Zer which would contain Bit Zero of
your binary input and you'd have a one
which would contain bit one of course
remember your binary inputs will then be
A1 and a z and so you'd be able to refer
to 0 0 which will give you location 0
again 01 which will give you address one
1 0 which would give you address two and
one one which would give you address
three and all we need to do is build up
a more complicated circuit which
combined a z and A1 or not a z and not
A1 with the w signal to connect to each
of these flip flops so that's how we
would do the writing to one we can
choose whichever FL flop we want by the
address and then we can strobe the W
thing to write into that one or that
one but what about reading how do we
combine the two outputs from our
flip-flops into a single the arm system
in the first Archimedes would run
reliably well above 100° C said way this
is just the half adder we want a binary
full adder