<- previous    index    next ->

Lecture 5, Instructions and Registers

Get paper handout, fill in values for registers and memory
as we discuss the instructions in this lecture.
The program starts with PC set to address zero.

address  instruction    assembly language

00000000 8C010074 	lw   $1,w2($0)
00000004 8C020078 	lw   $2,w3($0)
00000008 00000000 	nop
0000000C 00000000 	nop
00000010 00221820 	add  $3,$1,$2
00000014 00222022 	sub  $4,$1,$2
00000018 00012BC2 	sll  $5,$1,15
0000001C 00023403 	srl  $6,$2,16
00000020 0003380B 	cmpl $7,$3
00000024 00A25809 	or   $11,$5,$2
00000028 AC01007C 	sw   $1,w4($0)
0000002C 1C080070 	addi $8,w1
00000030 00000000 	nop
00000034 00000000 	nop
00000038 8D090004 	lw   $9,4($8)
0000003C 1D0A0008 	addi $10,8($8)
00000040 00000000 	nop
00000044 00000000 	nop
00000048 AD430000 	sw   $3,0($10) 
 ...
00000070 11111111 w1:	word 0x11111111
00000074 22222222 w2:	word 0x22222222
00000078 33333333 w3:	word 0x33333333
0000007C 44444444 w4:	word 0x44444444

After the CPU has executed the first instruction:
General Registers                          RAM memory
                                            initial    final
 0   00000000
     --------
 1   22222222                     00000070  11111111
     --------                               --------  ____________
 2                                00000074  22222222
    ______________                          --------  ____________
 3                                00000078  33333333
    ______________                          --------  ____________
 4                                0000007C  44444444
    ______________                          --------  ____________
 5                                00000080  xxxxxxxx
    ______________                          --------  ____________
 6
    ______________
 7
    ______________
 8
    ______________
 9
    ______________
10
    ______________
11
    ______________


Basic MUX Truth Table and Schematic



How MUX are used to route data



There are basic design principles for computer architecture
and many apply to broader applications.

Design Principle 1: 

       Simplicity is best achieved through regularity.

       A few building blocks, used systematically, will have
       fewer errors, be available sooner and sell for less.
       A uniform instruction set allows better compilers.

Design Principle 2:

       Smaller is faster:

       Smaller feature size means signals can move faster.
       Shorter paths, less stages, allow completion sooner.

Design Principle 3:

       Good design requires good compromises.

       There are no perfect architectures. There are kluges.

Design Principle 4:

       Make the common part fast.
       Amdahl's law, be sure you are maximizing speedup.


Pentium 4 Hyper threading


Beware Malware, Spyware and Adware:

McAfee: Malware Hides Behind Legitimate Companies

Trends in malware delivery include exploitation of affiliate 
advertising programs of legitimate Web sites, the anti-virus
vendor says. Read more and follow link to Money Bots


Malware Breaks Under Pressure 

Do everything you can to keep malware from infecting your systems,
malware authors do all they can to keep their work from being
detected and removed. By looking at the methods that malware uses
to keep itself safe, you can better root it out and remove 
it before the damage is done.

    <- previous    index    next ->

Other links

Go to top