Download presentation
Presentation is loading. Please wait.
Published byPreston Small Modified over 9 years ago
2
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
3
ADD R1, #15 The machine code instructions can also be represented by assembly code mnemonics that is a more user friendly code. (The processor decodes and executes these instructions)
4
Machine Code Instruction Compiled high level language programs are translated into machine code, so they are ready to be executed on a computer. The processor then decodes and executes the machine code instructions. (The processor decodes and executes these instructions) Machine code instructions consist of a series of binary digits (bits) in two parts represented below: OpcodeOperand
5
Machine Code Instruction A machine code instruction is a series of operational codes and operand parts as shown below: (The processor decodes and executes these instructions) Operation CodeOperand Part This is the basic machine code operation eg ADD Represents one item of data or the address of one item of data
6
(The processor decodes and executes these instructions) MC Instructions (16 bits)MnemonicsExplanation 0001 0000 0000 0011LOAD #3 Place 3 into the accumulator 1000 0000 0000 1101STORE 13 Place a copy of the accumulator contents into the memory location with address 13 0001 0000 0000 0110LOAD #6 Place 6 into the accumulator 0100 0000 0000 1101ADD 13 Sum the contents of the accumulator and memory location 13; place the result into the accumulator 1000 0000 0000 1110STORE 14 Place a copy of the accumulator contents into the memory location with address 14.
7
(The processor decodes and executes these instructions) The machine code instructions are difficult for people to understand. Therefore, assembly code instructions have been developed to represent them.
8
(The processor decodes and executes these instructions) Op-code: 4 bits Basic Machine Code Operation Explanation 0000Load involving main memory Load the accumulator register with a value fetched from the main memory location specified in operand part of the instruction 0001Load involving operand part Load the accumulator register with the value in the operand part of the instruction 0100Add involving main memory Add to the content of the accumulator a value fetched from main memory location specified in the operand part of the instruction 0101Add involving operand part Add to the contents part of the accumulator the value in the operand part of the instruction. 1000Store involving main memory Store the contents of the accumulator in the main memory location specified in the operand part of the instruction.
9
(The processor decodes and executes these instructions) Machine code instructions can be represented in various ways: 0000 1111 1111 Can represent the value 255 or it can represent a main memory location.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.