Reference no: EM132874862
1. What is the difference between 12 and "12"?
2. How are numbers represented inside a computer?
3. How are floating point numbers represented in a computer?
4. Translate the following decimal numbers into binary (show working not just only answers)
Decimal
|
Binary
|
2
|
|
10
|
|
20
|
|
50
|
|
Your age (only integer)
|
|
5. Translate the following binary numbers into octal then hex (show working not just only answers)
Binary
|
Octal
|
Hex
|
1010
|
|
|
11010
|
|
|
1111
|
|
|
11111111
|
|
|
10000000
|
|
|
6. What is the difference between computer memory and computer hard drives? (there are several, hint, think of speed, size, lifetime)
7. In Week 4 you will be given practical exercises about Little Man Computer. The Little Man Computer (LMC) is a simulator of a CPU, developed by Dr Stuart Madnick at M.I.T in 1965 to illustrate how the Fetch Execute Cycle executes instructions at the Assembler level in a Von Neumann architecture CPU, which has all of the basic features of a modern computer. Write a brief description of who Von Neumann was and what he did in microprocessor research.
Computer Architecture and Hardware System
1. What are the basic functions of the CPU?
2. Why is binary code suitable for use with computers?
3. Which register stores the result of ALU operations?
4. Which registers stores the location in memory address of the next instruction to be executed?
5. Why do processors need a clock? What unit is the clock speed of a processor measure in?
6. a) Assume that a CPU has a cycle time of one nanosecond. What is the CPU clock rate?
b) Also, assume that the fetch cycle is 40% of the processor cycle time. What memory access speed is required to implement load operations (copy data from a memory address to a register) with zero wait state?
c) What memory access speed is required to implement load operation with two wait states?
00 LDA 03
01 ADD 04
02 BRZ 05
03 DAT 006
04 DAT 005
05 HLT
a) Show the contents of the Program Counter (PC) - also known as the Instruction Pointer (IP), the Instruction Register (IR), the Address Register (ADDR), and the Accumulator (A or ACC) at the conclusion of instruction 00.
7. Suppose that the following instructions are found at the given location in memory
b) Show the contents of each register at the conclusion of instruction 01.
Introduction to Little Man Computer
Task 1 -Familarising yourself with LMC
This task is for you to practice and get acquaint with the LMC features, no need to submit anything.
2. LMC is now ready for you. The interface is simple and self-explanatory. Try clicking on HELP button to find more information about this CPU simulator help page.
3. There are 10 program examples come with this simulator which can be selected from SELECT dropdown list.
4. The Assembly Language Code section is where you write a program code on it. Once coding is done, click Submit button to submit the code to LMC. You can click RUN button to execute the program. A step by step execution (one instruction at a time) can be achieved by clicking on STEP button. RESET button is used to put the CPU back to its initial state, where the value of the Program Counter and that of the Accumulator will be reset to 0.
5. STOP is a toggle button. When a program is executing, pressing this button will pause the program execution, pressing a gain to continue executing the program.
6. Rather than writing program code directly on Assembly Language Code area, you can also use a text editor such as NotePad to write your program code on your computer. Use LOAD button to load your program code from your computer to LMC and run it.
7. OPTIONS contains a list of options that can be used to control the operation of LMC.
8. CPU is located between Assembly Language Code and RAM sections. This simple CPU contains a Program Counter (PC) to hold/point to the next memory address/location, an Instruction Register (IR) to hold an instruction op-code fetched from a memory address, an Accumulator to hold value during CPU operation.
9. Now, you may select an example code from SELECT button and try running the program. The operation speed can be adjusted by clicking on <<button (slower) or >> button (faster)
Task 2 - Writing a simple program
1. Read and understand the sample LMC program below. Take special consideration on the program structure. The following program demonstrates the use of LMC assembly language to add an input value to the constant value -1. Note that lines starting with "//" and characters to the right of program statements are considered comments, and are ignored by the LMC.
// A sample LMC assembly language
// to add a number to the value -1
INP// Input number to be added
ADDVALUE //Add value stored at address VALUE to
// input
OUT// Output result
HLT// Halt (program ends here)
VALUEDAT -001// Data value
2. Enter the program code above into the Assembly Language Code section, then Submit and run the program in ‘default normal' speed and then in ‘default slow' - using OPTIONS to select, assume number 10 was entered as an input value. Run the program again but using STEP button. Take a screenshot of each execution mode.
3. Observe and record the results, registers, and memory contents after the program execution has finished.
4. Which program execution mode do you prefer when you want to study the program operation in details for debugging purpose?
Task 3.
1. Draw side-by-side flow diagrams that show how the Little Man Computer executes a store instruction and the corresponding CPU fetch-execute cycle.
Attachment:- Week tutorials.rar