Midterm Questions
Conceptually connect transistors to logic gates and computing advances
Transistors can also work as switches. A tiny electric current flowing through one part of a transistor can make a much bigger current flow through another part of it. In other words, the small current switches on the larger one. This is essentially how all computer chips work. For example, a memory chip contains hundreds of millions or even billions of transistors, each of which can be switched on or off individually. Since each transistor can be in two distinct states, it can store two different numbers, zero and one. With billions of transistors, a chip can store billions of zeros and ones, and almost as many ordinary numbers and letters (or characters, as we call them).
XOR Gate truth table
True only if inputs are true false or false true, otherwise false.
NOR gate truth table
True only when both inputs are false.
What is volatile memory and non-volatile memory?
Volatile and Non-Volatile Memory are both types of computer memory. Volatile Memory is used to store computer programs and data that CPU needs in real time and is erased once computer is switched off. ... Volatile memory data is not permanent. Non-volatile memory data is permanent.
What inputs result TRUE in an NAND GATE?
When all inputs are false, the result is true.
Assembly Code
a low level language that is pretty simple to directly translate into code.
Binary is
a representation of an electrical signal being on or off.
What is an integrated circuit?
an electronic circuit formed on a small piece of semiconducting material, performing the same function as a larger circuit made from discrete components.
A CPU is an example of an _____________ circuit
an integrated circuit is the physical manifestation of a logic circuit.
After an ALU operation, these flags are typically stored
in a status register to make them available to the CU and ALU for either additional mathematic operations, or for evaluating conditions.
How many inputs does a Buffer Gate take?
it can only take one input, and the output is the same as the input.
According to this, a piece of memory used recently is likely to be used again or have nearby memory locations used again.
locality of reference
Describe "locality of reference" in caching from RAM.
locality of reference, also known as the principle of locality, is the tendency of a processor to access the same set of memory locations repetitively over a short period of time
Computer Architecture
one level abstract from the hardware, what is necessary to create functioning code for that organization.
For the ALU, the clock ensures
that enough time has passed for the correct output to have reached the final output wire, for even the most complex operation the ALU can handle. The clock also plays a vital role in ensuring that values are propagated to register or memory storage
CPU is
the brain of the computer.
The semantic gap can be described as:
the difference between common programming language operations and the instruction set of the computer
Connect the concepts of control units with machine code and instruction sets
.Control Unit is the part of the computer's central processing unit (CPU), which directs the operation of the processor. It was included as part of the Von Neumann Architecture by John von Neumann. It is the responsibility of the Control Unit to tell the computer's memory, arithmetic/logic unit and input and output devices how to respond to the instructions that have been sent to the processor. It fetches internal instructions of the programs from the main memory to the processor instruction register, and based on this register contents, the control unit generates a control signal that supervises the execution of these instructions.
Explain all inputs of a one-bit adder
A 1-bit adder circuit accepts two 1-bit binary numbers and a carry input and outputs a 1-bit sum and a carry. The next table shows the truth table for a 1-bit adder.
Assume that this ALU only has the following functions:
A AND B A OR B A PLUS B NOTB There are a couple of main components to consider: •Decoder and F inputs •Logical Unit• Full Adder •AB input•Output
In what scenarios can we use memory addressing?
A computer program uses memory addresses to execute machine code, and to store and retrieve data
Define a multiplexer
A multiplexer is a device which allows one of a number of inputs to be routed to a single output.
What is the difference between a multiplexer and demultiplexer?
A multiplexer is a device which allows one of a number of inputs to be routed to a single output. This type of circuit is able to take in what is essentially a binary number and turns on a single output that corresponds only to exactly that number.
Shift Register
A shift register is a type of register that is made up of flip flops with each output connected to the next flipflop in the sequence. Each time the clock is strobed, each bit from a previous flip flop moves to the next one in the sequence. A bit therefore travels through the registers in a certain sequence over time. Shift registers are used for a variety of datastorage and communication purposes. This includes microcontroller IO expansion, since one IO pin can send into a shift register a large number of signals that can then be processed over time. Shift registers can also be used as a time delay
Instruction Identifier
ADDX identifies what instruction should be performed.
What are the components of the CPU?
ALU and control unit
What 2 kinds of gates can be used to create functional equivalents of every other kind of gate?
AND and NOT gates
integrated Circuits:
An integrated circuit is a single piece of silicon that allows us to have many transistors, capacitors, and resistors printed as a single component, rather than many connected components having to be wired together.
Analog
Analog signals can be a continuum of values, for example any voltage from 0 to 5 V0V, 0.2V,1V,3.65V etc
This type of circuit is able to take in what is essentially a binary number and turns on a single output that corresponds only to exactly that number is
Binary to Decimal Decoder
Inputs and Outputs-FULL ADDER
Both A and B inputs are passed to both the logical unit and the adder, regardless of which operation has been selected, the enable wires coming from the decoder do not control inputs, but only outputs. The result of every operation is calculated, but only a 1 from the selected operation can reach the final OR gate.The final OR gate essentially takes any 1 signal produced by any selected operation and passes it through to the final single output wire. Three of the wires will be 0 for any particular operation, but the selected operation is the only one that can produce either 1 or 0 and have it reach the OR gate. This allows the output to receive only the correct output for the selected operation.
Clocked RS NAND Latch
By adding a pair of NAND gates to the input circuits of the RS latch, we accomplish two goals: normal rather than inverted inputs, and a third input common to both gates which we can use to synchronize this circuit with others of its kind.
Multiple Flip Flops
By combining multiple flop flops to a single clock,we can form multi bit memory.
AND Gate:
By combining two of our simple transistors in parallel we can have an AND gate. In order for the final output to be true, both control wires need to be on in order to allow current to flow from the top to the bottom. If either are off, the output will be off, making this an AND gate
Or Gate
By combining two of our simple transistors in series, we have an OR gate. Basically whenever current is allowed to flow through either or both semi conductor by a control wire being on, the output is on, making this an OR Gate.
NOT Gate
By connecting the previous examples output to ground, and moving the new output to the current's side, we can have a transistor NOT gate. When the control wire is off, the current flows into the output. When the control wire is on, the current wants to flow into the ground, which makes the output off. This way, the output is always the opposite of the control wire input.
This is a memory storage location larger than registers that is still internal to the CPU.
Cache
What is the difference between cache and register storage?
Cache is a smaller and fastest memory component in the computer Registers is a small amount of fast storage element into the processor.
Out of all the memory components within a computer, what is the fastest? 2nd Fastest?
Cache is the first and Ram is the second.
What are the two Logic Circuits covered?
Combinational Circuit and Sequential Circuit
Explain the difference between combinational logic gates and sequential logic gates.
Combinational The output of these kinds of circuits are based solely on the input currently received. Previous inputs have no effect on the current output. SEQUENTIAL: he output of these kinds of circuits is based on a combination of the present input and the sequence of past inputs. Previous outputs can feed back into the input
Distinguish computer organization from computer architecture
Computer organization explains how a computer works. Computer architecture provides functional behavior of computer system.
SYSTEM BUS:
Connects to the CPU, moves things around the computer
The Program Counter control register:
Contains the address in memory of the current (or next) instruction to be executed
Identify instances of addressed memory vs non-addressed memory
Content Addressable Memory (CAM) is also known as Associative Memory, in which the user supplies data word and associative memory searches its entire memory and if the data word is found, It returns the list of addresses where that data word was located. 1. RAM stands for Random Access Memory
CU
Control Unit, Routes command signals around CPU based on instructions.
What method can we use to form a multi bit memory?
D flip flop
Distinguish between analog and digital electrical signals.
Digital signals must have a finite set of possible values. Analog waves are smooth and continuous, digital waves are stepping, square, and discrete.
Digital
Digital values have a discrete (countable) set of possible values, and in this case those values are 0 or 1.This means that the voltage will go high or attempt to be low or as close to off as possible.
Arithmetic Logic Unit (ALU)
Does all of the math for the CPU, from addition to logical operations such as AND or Xor.
What is Moore's Law?
Every year computation of power doubles, and this doubling leads to exponential growth
A sequential circuit is a type of combinational logic circuit. T/F
FALSE, That's correct -- they are two distinct categories of logic circuits.
What are the 5 steps of the instruction cycle?
Fetch instruction (aka pre-fetch) decode instruction. evaluate address (address generation) fetch operands (read memory data) execute (ALU access) store result (writeback memory data)
The Decode portion of the instruction cycle
Figures out which instruction the opcode is
Identify the key electrical components of logic gates
Flow of current, logic gates use these signals to route instructions through computer hardware.
REGISTERS:
Holds Values for fastest access
CACHE:
Holds copies of small sections ofRAM for fast access
Instruction Register
Holds the most recently fetched instruction, which should be executed.
Which of these were an intended effect of CISC
Improve execution efficiency Simplify compiler creation
D Flip Flop
In the D latch, when the CLK input is 1, the Q output will always reflect the logic level present at the D input, no matter how that changes. When the CLK input falls to 0, the last state of the D input is trapped and held in the latch, for use by whatever other circuits may need this signal.
Combinational circuit describe the flow of input
Inputs on one side, outputs on the other. Information flows through them in a single direction Outputs do not talk back to in to the inputs. Range from very simple to immensely complicated.
ALU and the combinational circuit
Inputson one side, outputs on the other. The ALU is a fully combinational circuit. That is, none of the ALU outputs are wired back into the inputs; data flows from input to output, and never doubles back on itself; there is no need for a "Clock" signal; and the computations happen nearly instantaneously.
When following this replacement scheme, the memory block that has not been accessed in the longest amount of time will be replaced in the cache.
LRU
INTERNAL BUS:
Moves things around the CPU
What method can be to save the bits into memory?
Multiple Flip Flops
What circuit allows for one selection of multiple input choices to be routed to single output?
Multiplexer
STATUS FLAGS: give important secondary information about the result of the operation. There are typically at least 4 status flags:
N or Negative: Indicates whether the result of the operation is negative •V or Overflow: Indicates whether the result of the operation has exceeded the storage bounds. •Z or Zero: Indicates whether the result of the operation was a zero value •C or Carry: Conveys a leftmost carry from an addition operation, a leftmost borrow from a subtraction operation, or the overflow bit resulting from a binary shift operation.
What are the four status flags in the ALU?
N or Negative: Indicates whether the result of the operation is negative •V or Overflow: Indicates whether the result of the operation has exceeded the storage bounds. •Z or Zero: Indicates whether the result of the operation was a zero value •C or Carry: Conveys a leftmost carry from an addition operation, a leftmost borrow from a subtraction operation, or the overflow bit resulting from a binary shift operation
Which logic gate can be used to create all other logic gates?
NAND GATES
CARRY IN &OUT
Neither carry in nor carry out are considered data. The carry in is considered a controlsignal, and carry out is considered a status flag. Carry In comes from the status flag register, whereas Carry Out stores the new carry value in the same register. Not pictured are the other status flags, each of which typically only have an Out component unlike Carry.
Interpret electrical signals as boolean logic
ON power True, OFF power false
Which are characteristics of RISC?
One instruction per cycle Simple instruction formats
OR gate truth table
Only false when inputs are both false otherwise
XNOR or NXO
Only true when either both inputs are true or both are false.
What inputs result TRUE in an AND GATE?
Only when all the inputs are true.
A partially conductive surface metal coated holes that allow components to be plugged right in.
Printed Circuit Boards
A currently running program's instructions, addresses, and values can be found in the
RAM
Control Unit
Routes command signals around the CPU based on the instructions. The CPU of the CPU.
Explain how logic gates and logic circuits are physically constructed
Simple digital logic gates can be made by combining transistors, diodes and resistors with a simple example of a Diode-Resistor Logic (DRL) AND gate and a Diode-Transistor Logic (DTL) NAND gate given below.
Registers
Store important values necessary for the execution of the instructions.
AS AND BS:
Taken together, these are the data input (two bytes). Each bit of the first operand is passed into the A inputs, each bit of the second operand is passed into the B inputs.
What does the ALU do?
The ALU stands for Arithmetic and Logical Unit. Its sole responsibility is to calculate result of performing certain mathematical or logical operations on integer binary numbers. ADD• SUBTRACT• NEGATE• INCREMENT• DECREMENT• PASS THROUGH• AND• OR• XOR• ISZERO• NOT• And many more...
DECODER:
The F0 and F1 lead into a decoder, which causes these two bits to always turn on exactly one of four wires. Each of these four wires enables a different operation's result to reach the final output of the ALU. Essentially, all four operations are calculated every time, but only one output is allowed to reach the final OR gate. All of this is controlled by the decoder. We covered the decoder last week, its internals look like this:
ALU:
The Math Whiz, performs calculations on behalf of the CU
When does a carry flag set to 1 occur?
The carry flag is set if the addition of two numbers causes a carry out of the most significant (leftmost) bits added. 2. The carry (borrow) flag is also set if the subtraction of two numbers requires a borrow into the most significant (leftmost) bits subtracted.
Explain the role of the Control Unit in the context of a CPU
The control unit (CU) is a component of a computer's central processing unit (CPU) that directs the operation of the processor. It tells the computer's memory, arithmetic and logic unit and input and output devices how to respond to the instructions that have been sent to the processor.
Identify the functional relationship between control unit and the control lines, status flags on other units within the CPU
The control unit (CU) is a component of a computer's central processing unit (CPU) that directs the operation of the processor. It tells the computer's memory, arithmetic and logic unit and input and output devices how to respond to the instructions that have been sent to the processor.[1] It directs the operation of the other units by providing timing and control signals. Most computer resources are managed by the CU. It directs the flow of data between the CPU and the other devices.
Computer Organization
The electrical engineering level of a computer, the hardware units and layouts the data pathway, etc.
What is the difference between a half adder and a full adder?
The full adder is a circuit that allows us to add together three one-bit numbers and has two outputs. Half Adder has only two inputs and two outputs.
Full Adder
The full adder is a circuit that allows us to add together three one-bit numbers. For example, 1 + 1 + 1 = 11. This is extremely useful when you are adding together two big numbers, column by column (like we all did when adding decimal numbers in grade school!), and end up needing to "carry" the 1 to the next column -hence ending up in a scenario where you need to add together three one-bit numbers! The full adder is able to take in not only an A and B input, but can incorporate a carry signal from a previousoperation. It produces not only a sum output, but also the resulting carry signal, to be passed to either the next ALU, or if this is the ALU for the most significant bit, to the status register. The following Adder incorporates an enable signal, which prevents the adders output from propagating to either the finaloutputOR gate or the Carry pin if the ADD operation was not selected
F0AND F1:
The function or opcode lines, are shared by each ALU, to set them all to do the same operations.These are not considered data; these are controlsignals.
The Carry Flag is set to 1 if:
The last addition resulted in a carry The last subtraction resulted in a borrow
Logical Unit
The logical unit is the part of the ALU that performs the AND, OR, and NOTB operations. Remember, all of the operations are calculated because A and B flow into each of the left side gates. However, the AND gates are partially controlled by the decoder. A 1 result cannot escape the Logical Unit unless the corresponding enable pin for that operation is turned on. Otherwise all eachAND gate produces 0, but no false 1s will be produced.
The NOT gate takes only one input, but unlike a buffer gate it outputs?
The opposite value of the input.
Define a Combinational circuit
The output of these kinds of circuits are based solely on the input currently received. Previous inputs have no effect on the current output.
Define a Sequential circuit
The output of these kinds of circuits is based on a combination of the present input and the sequence of past inputs. Previous outputs can feed back into the input.
Do Nothing Gate
The simplest transistor simply passes the signal that it receives form its input to its output.
RAM is
The working memory of the computer, it hold instructions, he variable scope table, variable's values, as well as addresses to more instructions and values.
Select all that is true of combinational logic circuits. (Must get all correct.)
They can be simple, complicated, or anywhere in between An encoder is an example of one Given the same inputs, they always give the same outputs. That is, the outputs depend only on the current input They are nearly instantaneous, unlike sequential logic circuits, since the truth values don't have to cycle around over and over and there is no ticking clock to deal with A decoder is an example of one They are logic circuits An ALU is an example of one
Select all that is categorically true of sequential logic circuits. (Must get all correct.)
They often use clocks to manage the sequence of states There can be simple, complicated, or anything in between. They always have sections that loop back around within the circuit
System Bus is
This component are the actual wires responsible for transmitting the signals all around the computing architecture.
OS:
This is the data Output byte
One Bit Storage (Latches)
This logic circuit stores one bit indefinitely.
This consists of a control wire/input, a piece of semi conductor material, an output, and a place for current to enter. Allows the output signal to be controlled based on an input signal.
Transistor