InterviewSolution
Saved Bookmarks
| 1. |
Solve : How does a user give instructions/directions to a processor?? |
|
Answer» Im trying to figure out how a user can give instructions/directions to a processor. Here's the page i found on the subject Computer Instructions. I understand the user gave the instructions to draw the square by how exactly? Through the user's keyboard? Through some program? Any one can help me out?Logo See the second one on this link. Logo See the second one on this link. HuH ? ?Those instructions at that link aren't real low level CPU instructions, that is just an example. When giving a processor instructions, the lowest level a HUMAN would usually operate would be to write ASSEMBLY code where each individual CPU instruction is specified, this is how the CPU is told what to do. From there this assembly code is then compiled directly into machine code (binary) which is then run on the CPU. An example of actual low-level CPU instructions for a MIPS CPU is shown below which will add two numbers (4+5) and display the result (9) on the screen: Code: [Select]li $t0, 4 # Load 4 into register $t0 li $t1, 5 # Load 5 into register $t1 add $t2, $t0, $t1 # Add the two numbers and store result in $t2 MOVE $a0, $t2 # Move the ADDITION result into the argument register $a0 for syscall li $v0, 1 # 1 TELLS syscall to print the integer to the screen syscall # Do the syscallThanks camerongray. So, the assembly code is the bit you wrote at the end of your reply. That is then turned to machine code. Quote from: mattfaria12 on November 18, 2013, 01:27:28 PM Thanks camerongray. Exactly! The machine code is the raw binary (0s and 1s that are run on the CPU)Ok Thanks camerongray |
|