Operations on data Flashcards
What are the values of logic operations at bit level?
0 or 1
Name four bit-level operations
NOT, AND, OR and XOR
What is the NOT operator?
It outputs the complementary of the input bit e.g.
not 1 = 0
What is the AND operator?
The output is 1 if both inputs are 1 otherwise it outputs 0
What is the OR operator?
The output is zero if both inputs are zero otherwise the output is 1.
What is the XOR operator?
Its similar to the OR operator however when both inputs are the same it outputs 0 and will output 1 if both inputs are different
Are logic operations at pattern level the same as bit-level?
Yes
What is it called when using a NOT operator to convert a bit pattern to its opposite?
Complementing (NOT is also known as one’s complement operation)
What is a mask?
When you unset the corresponding bits in the first set
Name two types of logical shift operations?
Simple shift and circular shift
What is a simple shift?
It shifts each bit right/left and the rightmost/leftmost bit is lost and replaced with a 0.
What is a circular shift?
Shifts (rotates) all the bits left/right and the end bit will be passed to the beginning of the pattern.
What is the right Arithmetic shift operation?
It assumes the bit pattern is a Signed Integer in Two’s complement format and is used to divide an integer by 2. It shifts the bits to the righty and makes a copy of the sign and loses the rightmost bit.
e.g. 10010 -> 11001 ( the first 1 is replaced with the bit in the second position).
What is the left Arithmetic shift operation?
Is used to multiply an integer by 2. It shifts all the bits to the left and loses the sign. If the sign bit is the same it’s successful but if it’s different an overflow/underflow will occur and the result will not be valid.
11011-> 10110 succesful
10111->01110 unsuccesful
Name arithmetic operations?
adding, subtracting, multiplying, and dividing
what is (X^_+1) mean if its value was originally x?
Twos complementary of X
what is (X^_+1)?
Twos complement of X
What are the 3 categories of operations on data
Logic operations, shift operations, and arithmetic operators
Boolean algebra deals with constants, variables, and operators. Give e.g.
Constants only use the constants 0 and 1.
We use letters for variables e.g. x,y,z
3 basic operators are NOT, AND, and OR
How do we represent NOT, AND and OR
NOT x = x’
x and y = x.y
x or y = x+y
What are logic gates
An electronic device that takes 1 to n inputs and creates one output.
What is a buffer in boolean algebra
The buffer outputs what was inputed but amplifies the input signal.
Different gate operations?
NOT, AND and OR.
What is the NAND gate?
combination of AND gets followed by NOT gate
What is a NOR gate?
OR gate gets followed by NOT gate(complementary of OR gate).
XNOR gate?
The complement of the XOR gate.
Define a boolean function?
A function with n boolean input variables and one boolean output variable.
What are the two categories logic units are divided into?
Combinational circuits and sequential circuits
What is a combinational circuit made of?
Consists of n inputs and m outputs (m functions); the m outputs is defined by the m outputs of the truth table
What is a half adder?
A combinational circuit that adds 2 bits. Has 2 inputs and 2 outputs (output 1 = sum and output 2=carry)`
What is a multiplexer?
Don’t know
What is the difference between sequential circuits and combinational circuits?
Combinational circuits are memoryless, unlike sequential circuits which have a memory that allows it to remember its current state which is used in the future.
What is a flip-flop?
A storage element that can hold one bit of information
What is an SR flip flop? visit pg 576-577
A circuit that holds a state of the previous pulse and will change when it receives a new pulse.
What does the CPU do and what does it consist of ?
Performs operations on data. It consists of ALU, control unit nad registers
What does the ALU do?
It performs logic, shift, and arithmetic operations on data
What are registers
Are fast-stand-alone storage locations that temporarily hold data.
Name few types of registers?
Data registers, instruction registers, and program counters
What the control unit?
Its controls the operations of the subsystem
What is the main memory
The second major subsystem consists of a collection of storage locations each with a unique address. Data is transferred to and from memory in groups called words.
What is RAM?
Random Access Memory is a memory that is volatile(requires power to work) and can be written and read from.
What is Static RAM?
SRAM uses traditional flip-flop gates so there is no need to refresh memory. It is volatile and expensive.
What is DRAM?
It uses capacitors and electrical devices. If a capacitor is charged it equals 1; not charged it equals 0. They need to keep being refreshed as they can lose their charge. They are cheap
What is ROM?
Memory is non-volatile and can only be read from(can’t write to it) and is used for programs and that must not be erased on the device.
What is PROM?
Programmable ROM is when the memory comes blank and the user can install specific programs on it with a special device.
What is EPROM?
Erasable programmable ROM allows the user to program and erase it while using a special UV device that physically removes the memory.
EEPROM?
Electrically erasable programmable ROM can be programmed and erased using electronic impulses.
Where is the cache placed on the motherboard?
Between the CPU and main-memory
Explain the process of cache?
- CPU checks the cache
- If the word is not found the cache finds and copies the word from the main memory and replaces the previous content in the cache.
- CPU accesses the new content and copies it.
Why is cache so sufficient but small?
Users only use 20% of their data ( always using the same data) so cache only needs to hold 20% of all the data on the computer.
How do we access a word?
A word is a group of data that travels to and from memory. To find a word you need an identifier.
What is address space?
The total amount of identifiable locations (useable locations) in memory.