Saturday, July 20, 2013

Flip Flops and Memory


This is a simple flip/flop which acts as a latch. It operates through the use of feedback. Basically there are 4 scenarios. If you don't have a signal through either set or reset then whatever state the flip flop was in, it will stay in. If you input something into the reset but not the set the not Q will change. You can envision this as just a separate signal though through only the bottom wire. If you input into set but not reset, then the Q output will change, or the proper signal setting your "memory" bit to one. Which is why it can be called set. Then the Final is if you input a signal through both set and reset which clears all information, putting both states to 0.

S R Q Q̅
0 0 No change
0 1 0 1
1 0 1 0
1 1 0 0

This flip/flop is equivalent to one bit of memory as it is capable of holding a state.

Binary, 2's complement, Hexadecimal-

So since we are capable of storing a bit of memory, we can string them together to form larger sections of memory. We often refer to bytes of memory, which is 8 bits, which represents 256 different states.

27 26 25 24 23 22 21 20
0 1 0 0 1 1 0 1 would then = 77

You can then partition the byte into two halves and write the number in hexadecimal 
the high is
0 1 0 0 = 4
the low is
1 1 0 1 = d
Hexadecimal goes as 0 1 2 3 4 5 6 7 8 9 A B C D E F

2's complement is a way of making the operations of addition multiplication and subtraction identical. If we had these 8 bits be positive only we would count through 256 possible numbers from 0-255. Using two's complement we go from 0 -> 127 and then go back down from -128 to -1.

Boolean Operations

Boolean operations are used to develop logical circuits. This will be a brief overview of these functions. We will establish a truth table, where 1 represents an on signal, 0 represents an off signal. Q is just the result of applying our function using the Boolean operation specified

Q = A.B

AND Gate
The AND gate is an important function, we can think of this as multiplication as if we multiple the two signal together here we arrive at the following truth table for an AND gate.

0 0 0
0 1 0
1 0 0
1 1 1

Q = Q̅ = A.B

Function NAND
This is the NAND gate or the not AND gate. This simply reverses all the outputs of our AND gate.

0 0 1
0 1 1
1 0 1
0 0 0

Q = A + B

Function OR
The OR gate is similar to addition. However, its a version of addition that does not know how to carry over, as we can see by the last part of the truth table, but otherwise functions similarly.

0 0 0
0 1 1
1 0 1
1 1 1

Q = Q̅ = A + B

Function NOR
Again like the NAND gate, the NOR gate simply reverses the signal of the OR gate.

0 0 1
0 1 0
1 0 0
1 1 0

Electronics - Fluid Analogy Resistance

A good way to visualize electricity is to relate it to the movement of fluids. They have a lot of similarities as we will discuss below.


ΔV = -IR

This is simply stating that the change in voltage is the current multiplied by the resistance. The way we can think about this is that the voltage loss is due to the current passing through a volume more difficulty, otherwise known as resistance. We can show the resistance with the equation


Where rho is the resistivity due to impediments in the material, multiplied against the length, divided by the area.



This is the change in pressure due to an increase in resistance. We can visualize this increase in pressure by thinking about water flow through a pipe. Let us think about a large pipe transitioning to a smaller one. The change in pressure from the area before the small pipe to after the small pipe can be approximated by thinking about the smaller pipe as a resistive element, similar to resistance in a current. However instead of impediments as a function of the material, it is just the smaller size of the pipe. Therefore the resistance in this case would be proportional to (1/A) where A is the area of the smaller pipe.