ENCE260 Flashcards
(107 cards)
CPU to Internal peripherals
control bus, data bus (double)
CPU to memory
control bus, address bus, data bus (double)
CPU key functions
arithmetic,
evaluate logic expressions,
determine and control program flow
expression for number of combinations in a sequence
M^n
M = number of combinations
n = number of digits
Word length
default number of bits manipulated by microcontroller
ATMega32u2 is 8bit
Two’s compliment
swap the bits and add 1
1 more negative than positive
eg: 111 is -1,
000 is always 000.
Floating point
31st bit MSB
S-E8-F23
1 = -, 0 = +, same as two’s
write the number as binary, keeping the dot
E = Add 127 to amount you moved dot
F = fractional - 2nds, 4ths, 8ths, 16ths, etc
Combinational logic
output is a function of input only
Sequential logic
combinational logic with memory
SR latch
2 Nor gates
R sets one Q to on and one to off, which stays,
S switches it and stays
Issues - don’t know what initial state will be
##########
D flip flop
SR latch that works with a clock signal
basically just add an and for data and clock (to S)
and a not with the other and (for R)
Register
D flip flops that share a clock signal and output to a data bus
Data bus
width equal to CPU word length
transports data to and from CPU
Address bus
specifies memory locations
address space is 2^buswidth
controlled by CPU
16 bit in ATMega32u2
Control bus
sends commands to hardware from the CPU
Von-Neumann/Princeton architecture
all memory is stored in one place. Loses efficiency, as you can process only one thing at once instead of 2
Harvard architecture
instruction and data memory separate
canonical form logical functions
logic functions made of just the three fundamental functions:
AND, OR, NOT
algebraic properties: closure
if a,b elements of B, any function involving a and b will be an element of B
algebraic properties: identity
a.1 = a, a+0 = a
algebraic properties: annihilation
a.0 = 0, a+1 = 1
algebraic properties: absorption
a+(a.b) = a
a.(a+b) = a
algebraic properties: Idempotence
a+a = a, a.a = a
algebraic properties: or-compliment
a+!a = 1