FIT1047 Lecture Notes - Lecture 3: Master Boot Record, Register File, Binary Number

53 views5 pages
Week 3
Wednesday, 14 March 2018
1:06 PM
CPU - Central Processing Unit
Built out of logic gates
Executes instructions
Programming languages cannot be executed directly by CPU. They are compiled or interpreted.
We take human language and compile it into something the CPU understands. (Compiled means
translate)
CPU can only execute machine code.
Machine Code
Very simple
Different for each type of CPU architecture (smartphones are very different to laptop)
o Both can run python and java because it can be translated into different machine codes
Programs = sequence of instructions
o Stored in memory
o Each instruction is encoded into one or more words
Instruction Set Architecture (ISA) is the instructions that a particular type of CPU understands.
Does some maths (adds, subtract, multiple, compare)
o Arithmetic
Move data between memory, CPU and Input/output (I/O)
o Pressing keys on keyboard
Control how CPU executes conditionals and loops
Marie
Very basic machine architecture
16 bit words
16 different instructions
o Likely only need 10 or 12
One general purpose register (similar to variable in programming)
Instructions are composed of an opcode (4 bits) and an address (12 bits)
A register is a storage cell for temporary data.
A bit of memory inside CPU
AC register (accumulator): a "general purpose" register
o Works with data inside the CPU
Assembly language
Machine code is hard to read and write (1's and 0's)
It is the human language of machine code
Translates 1:1 into machine code
One mnemonic per machine instruction
Marie Instructions
Load X - 0001
Store X = 0010
Add X - 0011
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in
Subt X - 0100
Halt X - 0111
Skincond - 1000
Jump X - 1001
Ex.
Load 3
Add 4
Halt
DEC 10
DEC 100
//ALU = Arithmetic Logic Unit
https://marie-js.github.io/MARIE.js/
Combinational Circuit
Output is a function of the inputs
Only does half the job
Can only be used to add 2 bits together; cannot add 3 bits together
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents