User Tools

Site Tools


opus:spring2012:tgalpin2:asmpart3

asm Keywords

Fetch-Execute Cycle

Definition

The Fetch-Execute Cycle, also known as the Instruction Cycle, refers to the actions that the processor takes to essentially function. Simply, it explains how the processor grabs an instruction from memory, and carries out the actions required by the fetched instruction.

Demonstration

Below, a diagram detailing the Fetch-Execute cycle:

To clarify acronyms used within the image:

MAR: Memory Address Register
MDR: Memory Data Register
CIR: Current Instruction Register

[Source: Wikipedia: Instruction Cycle]

Processor & Memory Organization

Definition

Processor Organization refers to the different parts of the processor and their relationship with one another. Some parts of a processor include–

  • Arithmetic logic unit- Performs logic and arithmetic operations
  • Clock- Refers to the frequency at which the processor is operating
  • Control Unit- Coordinates operations of other parts of the processor and the flow of data
  • Registers- Storage within the CPU for quicker operation
  • Cache- Memory within the CPU for quicker operation

Memory Organization refers to the hierarchy in which memory is put. From the highest level, which is closest to the processor, to the lowest–

  • Processor registers
  • CPU cache (all of the various levels)
  • Main memory (RAM)
  • External memory
  • Hard disk storage
  • Removable media

Demonstration

Die map for the Intel Core i7 2600k processor, detailing the different parts of a processor. Note: the Core iX series of processors features an integrated graphics processor, which was not mentioned above. Integration of GPU's in to the CPU's die are a phenomenon that, while becoming more common, is still fairly recent.

243264-intel-core-i7-2600k-die-map.jpg

[Source: PCMag.com]

Data Instructions (Data Movement, Address Movement, Data Conversion, Bit Manipulation)

Definition

  • Data Movement: Instruction that moves given data from one location, be it a location in memory or in a register, to another location.
  • Address Movement: Instruction that moves a given address from one location to another. The locations here can also be a memory location or registers.
  • Data Conversion: Instruction that simply changes the data type of the type of data being dealt with.
  • Bit Manipulation: Instructions that change individual bits. Setting a bit sets the value to 1, where clearing a bit sets it to 0.

Subroutines (Calling, Return Address)

Definition

A Subroutine is a break in the main flow of instruction, as we know, that operates a set of instructions mostly independent of the main set of instructions. We know this from the concept of functions already. Calling a subroutine is when the main set of instructions branches off in to said subroutine to perform the instructions defined within it. A return address is, of course, at the end of the subroutine, and it lets the processor know where operation left off before deferring to the subroutine.

Demonstration

Here's a simple example of code in C to demonstrate how a subroutine works:

int main()
{
   int subroutineInstruction(); //Calling a subroutine
   return(0);
}
 
int subroutineInstruction()
{
   printf("Operating subroutine...\n");
   return(0); //Returning
}

Stack Operations

Definition

Stack Operations refers to how the FILO data structure known as a stack, in the case, the stack of operations and instructions for a processor, can be manipulated. Most importantly, we know about the push and pop operations.

  • Push– Add an element to a stack. In this case, an instruction. Adds an instruction to the top of the instruction stack.
  • Pop– Removes an element, or in this case instruction, from the stack. It is removed from the top of the stack as well.

Demonstration

Data Representation (Big Endian, Little Endian, Size, Integer, Floating Point, ASCII)

Definition

Data can be represented in a number of ways. The smallest unit of data, as we know, is a bit– the binary digit. We also a byte, which is 8 bits. Integer (int) and Floating Point (float) are types of data. Integer is self explanatory (ex. 1, 2, 3, etc.), and floating point would be numbers like 1.00, 2.00, 3.00. ASCII is the American Standard Code for Information Interchange, which is a character-encoding scheme that takes a value and converts it to a character. Big Endian and Little Endian refer to how bits are stored in a byte. Big Endian stores big-end data first (ex. 0x1234), where Little Endian stores little end data first (ex. 0x3412).

Demonstration

Data Representation (Sign Representation, One's Complement, Two's Complement)

Definition

Sign representation deals with encoding negative numbers in a binary system. One's Complement is one way to change a binary value to a negative complement value. All it does is flip every bit in the value, so 0's become 1 and 1's become 0. Two's Complement, however takes it a step further and adds one after flipping every value. This is so that negative values created through Two's Complement can easily coexist with positive numbers.

Demonstration

Example:

Decimal Value: 9
Binary Value: 01001
One's Complement: 10110
Two's Complement: 10111
Decimal Value After: -9  

Linking, Object and Machine Code

Definition

Linking refers to putting together a bunch of different objects produced by the compiler together to form one program during the compile process. Object code, as we know is what a compiler produces when it is given source code. It is a level above Machine Code which is comprised of our familiar ones and zeroes. Machine Code is read by the processor, and as is such, is the lowest level of code.

Demonstration

Below is a diagram of the process of linking.

[Source: Wikipedia: Linker]

asm Objective

asm Objective: Familiarity With The Organization Of A Computer System

Definition

Basically, to meet this objective, one must understand how all of the components of a computer work together to achieve what we see on our screens. This includes, specifically, how the processor works, as it is truly the heart of the computer.

Method

This can be measured out through my progress with the opus and EOCE. Any other possible method would simply require that I repeat myself over again.

Measurement

Analysis

Ultimately, as I said, there wasn't a whole lot else I could do other than point to my previous work or to repeat myself. I think my work on my opus speaks for itself, as far as this objective goes.

opus/spring2012/tgalpin2/asmpart3.txt · Last modified: 2012/05/10 02:18 by tgalpin2