INF_106_Lab 3_Practice Activity

Слайд 2

Software: machine code

● Software - code that runs on the hardware
● CPU

Software: machine code ● Software - code that runs on the hardware
implements "machine code" instructions
● Each machine code instruction is extremely simple
○ e.g. add 2 numbers
○ e.g. compare 2 numbers

Слайд 3

Software: machine code

The language of the machine code is hardwired into the
design

Software: machine code The language of the machine code is hardwired into
of the CPU
○ it is not something that can be changed
○ Each family of compatible CPUs (e.g. the very popular
Intel x86 family) has its own machine code which is not
compatible with the machine code of other CPU
families.

Слайд 4

Lyrics

CPU is capable of performing simple instructions if you load them into

Lyrics CPU is capable of performing simple instructions if you load them
RAM. For example addition/subtraction of two numbers, jumping to another instruction. While CPU is performing an instruction the temporary results are stored inside CPU itself in the fastest, smallest memory locations – registers. CPU starts by fetching an instruction from RAM and then executes/performs it. Then again fetches and executes... This is all CPU does. Initially all programs are on hard disk. When user double-clicks a program icon the machine instructions of that program get loaded to RAM where CPU can access them and execute.

Слайд 5

What are the instructions?

CPU has list of defined instructions, such as:
● add

What are the instructions? CPU has list of defined instructions, such as:
values
● store values
● copy values
● increment value
● go to command

Слайд 6

Example

Signals sent to CPU
(10110000 01100001) (read in hex B0 61)
B0 means “Move

Example Signals sent to CPU (10110000 01100001) (read in hex B0 61)
a copy of the following value into AL (place in memory)”
Value in AL memory is equal to 61 in hexadecimal

Слайд 7

What is assembly language

CPU understands only electrical signals, such as: (10110000 01100001)
But

What is assembly language CPU understands only electrical signals, such as: (10110000
to be understandable to programmers, assembly languages were created.
Assembly languages use words instead of binary commands, as: MOV AL, 61h

Слайд 8

Little Man Computer

The Little Man Computer (LMC) is an instructional model of

Little Man Computer The Little Man Computer (LMC) is an instructional model
a computer.
The LMC is generally used to teach students, because it models a simple architecture computer - which has all of the basic features of a modern computer.
It can be programmed in machine code or assembly code.

Слайд 10

Set of instructions:

Set of instructions:

Слайд 11

Try it: Little Man Computer

http://robowriter.info/little-man-computer/
http://peterhigginson.co.uk/LMC/
Battle Tank:
http://pddring.github.io/cpu-battle-tank/

Try it: Little Man Computer http://robowriter.info/little-man-computer/ http://peterhigginson.co.uk/LMC/ Battle Tank: http://pddring.github.io/cpu-battle-tank/

Слайд 12

Practice

T1: Read two numbers and output their sum and difference
T2: Enter two

Practice T1: Read two numbers and output their sum and difference T2:
numbers, and output them in ascending order
T3: Read three numbers and output them in ascending order

Слайд 13

Deadline

Laboratory work 3 deadline 07.02.21 at 23.59 pm.

Deadline Laboratory work 3 deadline 07.02.21 at 23.59 pm.
Имя файла: INF_106_Lab-3_Practice-Activity.pptx
Количество просмотров: 37
Количество скачиваний: 0