Computer architecture is the science and art of selecting and interconnecting hardware components, which include CPUs, memory, storage, and I/O, to create computers that meet functional, performance, and cost goals.On the other hand, assembly language is defined as
Assembly language is a symbolic representation of the machine language, which consists entirely of numbers, of a specific processor.A processor only understands machine code. An assembly language program has to be converted to machine code by an assembler before a processor executes it. An example of an assembly language program and its corresponding machine code is given below:
.begin |
|||
.org 2048 | |||
a_start | .equ 3000 | ||
2048 | ld length,% | ||
2064 | be done | 00000010 10000000 00000000 00000110 | |
2068 | addcc %r1,-4,%r1 | 10000010 10000000 01111111 11111100 | |
2072 | addcc %r1,%r2,%r4 | 10001000 10000000 01000000 00000010 | |
2076 | ld %r4,%r5 | 11001010 00000001 00000000 00000000 | |
2080 | ba loop | 00010000 10111111 11111111 11111011 | |
2084 | addcc %r3,%r5,%r3 | 10000110 10000000 11000000 00000101 | |
2088 | done: | jmpl %r15+4,%r0 | 10000001 11000011 11100000 00000100 |
2092 | length: | 20 | 00000000 00000000 00000000 00010100 |
2096 | address: | a_start | 00000000 00000000 00001011 10111000 |
.org a_start | |||
3000 |
a: |
Sad after the funeral of a friend, my wife and I ducked into a Chinese restaurant for a pick-me-up. The feel-good session ended when I read the fortune cookie: “You will soon be reunited with a good friend.” |