Brandon has a MS in systems engineering & a PhD in Cyber Security. He has taught at several universities and possesses 12 industry certifications.
The process of utilizing low-level architecture is mainly done through an assembly language process that happens with a series of registers. Information that travels from the CPU across the bus to things like the memory address register or memory buffer register is done through a series of electrical signals going across the motherboard.
All these registers are used by the CPU to create and perform operations. Input is stored in these registers and then output will be sent to the screen after processing and results are completed inside the registers. This happens through a series of commands set forth by the CPU and the program counter.
- fetch - The fetch command or fetch operation is used for instructions that the user gives to the computer. These instructions are stored in the main memory and are fetched using the registers.
- decode - The decode operation is an operation for interpreting instructions. The instructions that are decoded will be sent to the CPU to find out what operation is supposed to be performed, for example, an arithmetic operation. This is processed through the arithmetic logic unit.
- execute - The execute operation is performed solely by the CPU. This operation produces results, stores things into memory, and displays output to the user's screen. It is the final step of the data movement process or any other instruction given to the registers.
Memory Address Register
The memory address register (MAR) holds the addresses of data and instructions. If the CPU wants to store data in memory or read memory, the memory address register will contain all that information.
The program counter is commonly known as the instruction address register or instruction pointer in Intel x86 micro processing code. The program counter keeps track of the next memory address of instructions that are to be executed. Once the current instruction is completed, the program counter holds the address of the next location of instruction that needs to be executed by the processor.
Memory Data Register
The MDR contains data that is used inside RAM. The MDR is an essential process that assists a computer in performing functions faster rather than consistently having to fetch and seek from stored memory. Its primary function is to act as a two-way register that will allow data to be written and fetched more rapidly for things that are used more often.
Memory Buffer Register
The MBR holds the contents of all data, instructions or processes that are being written into memory. All data storage and instruction coming from the CPU that is going to memory go into the MBR.
The combinations of all these registers are how data moves inside a computer. Input is given by the user. It is fetched and stored into the registers. If processing is required these will be decoded and processed. The program counter will continue to increment to point to the appropriate locations within memory to find what is to be manipulated and the CPU will process execute instructions and produce output across the registers.
Performing arithmetic is a bit different from a low-level architecture standpoint. The most basic function, addition, is incredibly straightforward. First, understand that all decimal equivalents must be translated to binary. The first 10 binary numbers look like this.
Now, if you want to add 2 to 3, it looks like this:
2 + 3 = 00000010 add 00000011.
This instruction is fetched and executed by the arithmetic logic unit. In binary, when you add a zero and a one, it becomes a one. When you add a one and one, it behaves like the addition of anything moving out of a placeholder for decimal. The one and the one carry over into the next digit to the left. So, 2 + 3 or 00000010 add 00000011 becomes 00000101 or 5.
Subtraction requires what is known as the two's complement. This is because subtraction, for a computer, is really just the addition of negative numbers. In order to find the two's complement, take the number in binary, produce the inversion of that number and add one. For example, we know that the number two is represented as 00000010. The two's complement of this number is 11111101 + 00000001. So, it is really 11111110 for -2 in 8-bit binary. Now, if we want 3 - 2 we just add them together as:
3 + (-2) = 00000011 + 11111110.
This equals 00000001 or 1.
Multiplication is done through addition. So, 5 ∗ 5 is really 5 + 5 + 5 + 5 + 5. Division (5/5) is the same as 5 + (-5) + (-5) + (-5) + (-5) + (-5).
From an architecture standpoint, Boolean logic is similar to any other binary function. What it does is allows for a set of choices around the three words OR, AND, and NOT.
The OR function is an operator that tries to include as much as possible to ensure that nothing is missed. If there were 10 million total responses to a search for cats plus dogs, but 1 million were a combination of cats and dogs, using OR would return 9 million to the user. OR as a function always removes the union.
AND as a function seeks to only find where things are joined. So, in the above example, 1 million would be returned because 1 million searches were cats AND dogs together.
NOT is a negation. So, in the search above, if we chose NOT cats, all searches that contained only dogs would be returned.
Bit manipulation and bitwise operators come from arithmetic truth tables on binary functions. As discussed previously, NOT, AND, and OR are Boolean function types. They can be used to manipulate binary data.
NOT ( ~ )
Here's an example of NOT.
N = 5 = 101
~N = ~5 = ~101 = 010 = 2
AND ( & )
Here is an example of AND.
A = 5 = 101, B = 3 = 011, A & B = 101 & 011= 001 = 1
So, for any and representation, the ones must agree or they become zero.
OR ( | )
Here is an example of OR.
A = 5 = 101, B = 3 = 011
A | B = 101 | 011 = 111 = 7
In OR's case, anything that is 1, stays 1. Otherwise, it is zero.
XOR ( ^ )
XOR or comparison of the bit patterns. If both are zero or one, then they become zero. If they are different, they become 1.
A = 5 = 101 , B = 3 = 011
A ^ B = 101 ^ 011 = 110 = 6
Left Shift ( << )
Left shift basically shifts the bits to the left and adds a zero. It is the equivalent of multiplying it by 2^k. (k being whatever placeholder it is in binary, such as 2^1 or 2^4)
1 << 1 = 2 = 2^1
1 << 2 = 4 = 2^2 * 1 << 3 = 8 = 2^3
1 << 4 = 16 = 2^4 … 1 << n = 2^n
Right Shift ( >> )
The opposite is true of right shift. In right shift, the binary operator shifts the desired number to the right and adds 1 at the end. It is a dividing method.
4 >> 1 = 2
6 >> 1 = 3
5 >> 1 = 2
16 >> 4 = 1
Low-level architecture can be a daunting task. The bitwise manipulations happen in nano and microseconds to become output to our screen. Understanding a fraction of the process is key to realizing how data travels from keyboard, to CPU, to register, to memory and to output. Manipulations of bits happen on a multitude of levels. The use of the symbols, &, |, >>, <<, ^, and ~ should become familiar and with a bit of practice and simple understanding, these will assist with the processing of instruction sets.
To unlock this lesson you must be a Study.com Member.
Create your account
Register to view this lesson
Unlock Your Education
See for yourself why 30 million people use Study.com
Become a Study.com member and start learning now.Become a Member
Already a member? Log InBack