Computer Systems Architecture Flashcards
What is a computer?
hardware, software and peripheral devices that work to solve problems
What are the components of a computer?
hardware, software, data, communication component
What is the hardware of a computer?
the physical mechanisms such as the cpu, memory, storage, input/output devices and buses
What is the software of a computer?
provides instruction that tell the hardware what to do
What does system software do?
interfaces between user programs and hardware
What is application software?
the users program
What do compiler do?
translates high level language to instructions the hardware can execute
What does data do in a computer?
computer can manipulate data and is only recognised in binary representation
What does the communication component do in a computer?
transports data to connect computer systems
What does div do?
it gives the quotient of a division
What does mod do?
the remainder of a division
How do you express a real number?
The digit in the number times by the power it is at
eg:
12.56 = (1 * 10^1) + (2 * 10^0) + (5 * 10^-1) + (6 * 10^-2)
How do you convert a decimal to any base?
get the number and divide it by the base of the conversion, then the remainder is the first digit, then repeat this until you can’t divide the number by the base any more.
eg: 678 → hexadecimal
678 / 16 = 42 R 6
42 / 16 = 2 R a(10)
2 / 16 = 0 R 2
read from bottom to top
therefore 678 → 2a6
How is ASCII represented in a computer?
a unique 7 bit binary code is given to each character and is stored in a byte
How are numbers internally represented?
numbers are input as string which are then converted into binary
What determines the number of integers that are able to be represented?
the bit length patterns
= 2^n
half are signed and not signed
How do you reduce time when going from decimal to binary?
decimal -> hexadecimal -> binary
How do you write negative numbers in two’s compliment?
2^n - Number
What is the range of fixed length integers using n bits?
[-2^(n-1)] <= n <= [2^(n-1) -1]
What is the most significant bit?
always the sign bit
What are the commutative laws?
A&B = B&A
A|B = B|A
What are the AND laws?
A&0 = 0
A&A = A
A&1 = A
A&-A = 0
What are the OR laws?
A|0 = A
A|A = A
A|1 = 1
A|-A = 1
What is a circular shift?
the bits are moved in circular motion
What is a logic shift?
the bits are moved and the gap is filled with a 0
What is an arithmetic shift?
the bits are moved and on left shift the gap is filled with a 0 and on right shift the MSB is conserved
What does a left shift one bit do?
doubles the number
What does right shift one bit do?
halves the number
What is a status register?
a register that includes four named bits called condition code that store information about arithmetic operations happening
What are the condition codes?
Carry(C)
Overflow(V)
Negative(N)
Zero(Z)
What does the carry condition code indicate?
indicates whether the number is too large for the number of bits this is for unsigned numbers
What does the overflow condition code indicate?
whether the sign has been changed because of the operation
What does the negative condition code indicate?
if the number is negative
What does the zero condition code indicate?
if the number is zero
How do you multiply in binary?
multiply each of the numbers on the bottom row by the top row.
eg:
1001
x 0111
——————————
= 1001
1001
+ 1001
0000
——————————
0111111
How many bits are allocated to the exponent in single precision floating point?
8
How many bits are allocated to the fraction in single precision floating point?
23
How many bits are allocated to the exponent in double precision floating point?
11
How many bits are allocated to the fraction in double precision floating point?
52
How do you represent real numbers in IEEE 754 floating point format?
- put the number in 1.<fraction> x 2^e format</fraction>
- find the exponent
- find the fraction
- round the fraction if needed
- put sign bit (1 is negative)
- put exponent and fraction after
How do you put number in 1.<fraction> x 2^e format?</fraction>
change e until the integer div 2^e = 1.
if the number doesn’t have an integer is should be num x 2^e = 1.
How to find the exponent for IEEE format?
e + (2^(number of bits allowed - 1) - 1
How do you find the fraction for IEEE format?
times the fraction by 16 and take note of the integer and repeat using the fraction of that calculation. Repeat until there is no fraction or you reach the bit boundary
How do you round binary number?
right shift the number by 1 bit if the bit that was lost was a 1, add 1 to the number and if it was a zero do nothing
How do you convert binary to decimal?
binary to hex and then use polynomial representation to get to decimal
How do you convert from octal to hex?
octal to 3 bit binary and then group in 4 bits then convert to hex
What is a register?
temporary storage inside the cpu
What is a general purpose register?
designed as temporary memory for data being manipulated by cpu
What is a special purpose register?
designed to keep special information during operations
What is CISC?
complex instruction set computer
many instructions
variable length encoding
convenient
high power consumption
What is RISC?
reduced instruction set computer
few instructions
fixed length encoding
simple and fast
power efficient
What is memory made up of?
many cells that have there own address
How much data can be stored in a cell?
can be k bits, however most use 8
What is the address space?
the number of bits used to represent memory addresses
How many bits can be used for a memory address?
a 32 bit architecture has 0 to 2^32 -1
What are bytes grouped by?
grouped into “words”
32 bit has 4 bytes, 64 bits has 8
What is a big endian?
address to the most significant byte when loading a word from memory
What is a little endian?
address to the least significant byte when loading a word from memory
What does 0x mean?
denotes hexadecimal values