Computerarchitecture
DigitalArithmetics 1
CPU 3
Processor 3
ControlUnit 3
ProcessingUnit 4
InstructionFlow 5
Memory 7
Segmentation 10
Paging 10
MemoryAccessPerformance 11
Cache 12
OperatingSystems 13
FileManagement 14
FileCorruption 15
MemoryManagement 16
ProcessManagement 17
ProcessCreation 17
Multi-programExecution 18
ProcessScheduling 20
ProcessStates 21
Inter-processCommunication 21
DeviceManagement 22
,DigitalArithmetics
Componentsofthenumber:-50
- Sign:negativeorpositive
- Digit:single‘unit’ofanumber(‘-’,‘5’,‘0’)
- Symbol:expressionofadigit(i.e.thenumber5)
- Symbolsize:howmanyexpressionsadigitcanhave(base-10)
Self-information Howmuchinformationeachsymbolcarries
Entropy Howdistincteachsymbolis
Base-2hashighentropy(0.5),butlowself-information,base-10haslowentropy(0.1),yethigh
self-information.Thehighertheentropy,themorecostlytotransmitthenumber(morebits)
Binary→Decimal Decimal→Binary
11012 =1x20
+0x21
+1x22
+1x23
=1310 4/2=2 R 0
2/2=1 R0
1/2=0 R1(MSB) → 410
=1002
Decimal→Hexadecimal
177/16=11R1 →1 Hexadecimal→Decimal
11/16=0 R11→B
→17710 =B116 F516 =5x160 +15x161 =24510
Binary→Hexadecimal Hexadecimal→Binary
101101102 →1011|0110=B|6→B616 D716 → D|7=1101|0111→110101112
Representationofintegers:
Signed(signfor-or+) One’scomplement(bit-flip) Two’scomplement(bit-flip+1)
+ Easycomputation + Easycomputation + Arithmeticscorrect
+ Easyconversionto + Easyconversionto (likeunsigned)
widerbyteformats widerbyteformats + Easyconversionto
- Shrinksrange + Veryfastcomputation widerbyteformats
- Arithmeticsincorrect - Arithmeticsincorrect + Unambiguous(single
- Double0,+0and-0 - Nothandleoverflows symbolfor0)
- Morecomplexcalcof
actualnumber
Logicaloperations:
- NOT:inverseofabit(1→0,0→1)
- AND:is1ifbothare1
- NAND:is0ifbothare1
- OR:is1ifoneorbothare1
1
, - NOR:is0ifoneorbothare1
- XOR:is1ifonlyoneis1
Floatingpointfractionalmakestheplacementoftheperiodvariable.Converting-93.328125to
IEEE754wouldlooklikethis:
1. Sign=1
2. Converttobinary→X=01011101.01010100
3. ShiftXsothattheMSBequals1→X=1.01110101010100
4. Determinetheexponent:howmanypositionsdidyoumovetheperiod?
a. E=6(positionstotheleft)
b. Add127.E=127+6=133
c. Convertthistobinary→133=10000101
5. 32-bitfloatingpointnumber=sign|8-bitexponent|23-bitmantissa→
1|10000101|01110101010100000000000
2