DOC PREVIEW
IUPUI CSCI 23000 - Information Representation: Machine Instructions Demo

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Information Representation: Machine Instructions DemoxComputer AppletxComputer InstructionsSample OpcodesSemantic GapReal-life Example: Pentium 4.Pentium 4 ADDPentium 4 Add (cont)AcknowledgementsDale RobertsDepartment of Computer and Information Science,School of Science, IUPUICSCI 230Dale Roberts, LecturerDale Roberts, [email protected]@cs.iupui.eduInformation Representation: Machine Instructions DemoDale RobertsxComputer AppletxComputer AppletxComputer applet – a java applet that simulates a simple xComputer applet – a java applet that simulates a simple model computer (which is also called xComputer). The model computer (which is also called xComputer). The model computer is discussed in Chapter 3 of model computer is discussed in Chapter 3 of The Most The Most Complex MachineComplex Machine. The xComputer consists of a Central . The xComputer consists of a Central Processing Unit (CPU) and a main memory that holds Processing Unit (CPU) and a main memory that holds 1024 sixteen-bit binary numbers. The CPU contains an 1024 sixteen-bit binary numbers. The CPU contains an Arithmetic-Logic Unit (ALU) for performing basic Arithmetic-Logic Unit (ALU) for performing basic arithmetic and logical computations. It also contains arithmetic and logical computations. It also contains eight registers, which hold binary numbers that are eight registers, which hold binary numbers that are being used directly in the CPU's computations, a Control being used directly in the CPU's computations, a Control circuit, which is responsible for supervising the circuit, which is responsible for supervising the computations that the CPU performs, and a clock, which computations that the CPU performs, and a clock, which drives the whole operation of the computer by turning drives the whole operation of the computer by turning its single output wire on and off.its single output wire on and off.Dale RobertsxComputer InstructionsxComputer InstructionsxComputer uses 16 bits per instruction. 6 bits xComputer uses 16 bits per instruction. 6 bits are dedicated to the opcode, leaving 10 bits for are dedicated to the opcode, leaving 10 bits for the operand.the operand.The type of information stored in the operand is The type of information stored in the operand is dependent on the instruction being executed.dependent on the instruction being executed.A listing of xComputer opcodes can be found at A listing of xComputer opcodes can be found at http://www.cs.iupui.edu/~aharris/n301/xMachine.htmlhttp://www.cs.iupui.edu/~aharris/n301/xMachine.html..The xComputer applet can be run from http://www.cs.iupui.edu/~aharris/n301/alg/tmcm-The xComputer applet can be run from http://www.cs.iupui.edu/~aharris/n301/alg/tmcm-java-labs/labs/xComputerLab1.html.java-labs/labs/xComputerLab1.html.xComputer uses 16 bits per instruction. 6 bits xComputer uses 16 bits per instruction. 6 bits are dedicated to the opcode, leaving 10 bits for are dedicated to the opcode, leaving 10 bits for the operand.the operand.The type of information stored in the operand is The type of information stored in the operand is dependent on the instruction being executed.dependent on the instruction being executed.A listing of xComputer opcodes can be found at A listing of xComputer opcodes can be found at http://www.cs.iupui.edu/~aharris/n301/xMachine.html.http://www.cs.iupui.edu/~aharris/n301/xMachine.html.The xComputer applet can be run from http://www.cs.iupui.edu/~aharris/n301/alg/tmcm-The xComputer applet can be run from http://www.cs.iupui.edu/~aharris/n301/alg/tmcm-java-labs/labs/xComputerLab1.html.java-labs/labs/xComputerLab1.html.Dale RobertsSample OpcodesSample OpcodesCodeCodeAssemblyAssemblyNameNameExampleExampleDescriptionDescription000000000000ADDADDAdd-to-ACAdd-to-ACADD 12ADD 12AC = AC + (12)AC = AC + (12)000001000001SUBSUBSubtract-from-ACSubtract-from-ACSUB 12SUB 12AC = AC – (12)AC = AC – (12)000010000010ANDANDLogical-AND-with-ACLogical-AND-with-ACAND 12AND 12Bitwise AND with Bitwise AND with (12)(12)000011000011ORORLogical-OR-with-ACLogical-OR-with-ACOR 12OR 12Bitwise OR with (12)Bitwise OR with (12)000100000100NOTNOTLogical-NOT-of-ACLogical-NOT-of-ACNOTNOTBitwise NOT of AC. Bitwise NOT of AC. Parm ignored.Parm ignored.000101000101SHLSHLShift-AC-LeftShift-AC-LeftSHLSHLshift left 1 bitshift left 1 bit000110000110SHRSHRShift-AC-RightShift-AC-RightSHRSHRshift right 1 bitshift right 1 bit000111000111INCINCIncrement-ACIncrement-ACINCINCAC++AC++001000001000DECDECDecrement-ACDecrement-ACDECDECAC--AC--(12) refers to the contents of address 12Dale RobertsSemantic GapSemantic GapMachine languages:Machine languages: Native tongue of a particular kind of computer. Each Native tongue of a particular kind of computer. Each instruction is a binary string. The code is used to indicate operations to be instruction is a binary string. The code is used to indicate operations to be performed and the memory cells to be addressed. This form is the easiest form for performed and the memory cells to be addressed. This form is the easiest form for computers to understand, but is the most difficult for a person to understand.computers to understand, but is the most difficult for a person to understand.Assembly languages:Assembly languages: Again, specific to one type of computer. Uses Again, specific to one type of computer. Uses descriptive names for operations and data, descriptive names for operations and data, e.g.e.g. “LOAD value”, “ADD delta”, “Store “LOAD value”, “ADD delta”, “Store value”. Assemblers translate this to machine language. Intermediate level. value”. Assemblers translate this to machine language. Intermediate level. Somewhat descriptive, but basically follow the machine instructions.Somewhat descriptive, but basically follow the machine instructions.High-level languages:High-level languages: Write program instructions called Write program instructions called statementsstatements that that resemble a limited version of English. resemble a limited version of English. e.g.e.g. “value = value + delta”. “value = value + delta”. PortablePortable, , meaning it can be used on different types of computers without modification. meaning it can be used on different types of computers without modification. Compilers translate them to machine languages. Example are Fortran, Pascal, Compilers translate them to machine languages. Example are Fortran, Pascal,


View Full Document

IUPUI CSCI 23000 - Information Representation: Machine Instructions Demo

Download Information Representation: Machine Instructions Demo
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Information Representation: Machine Instructions Demo and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Information Representation: Machine Instructions Demo 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?