Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Can somone direct me to a book or site for help with this hw I have
Closed Thread
Old 01-25-2006, 09:26 PM   #1 (permalink)
 
Newb Techie

Join Date: Jan 2006

Posts: 2

r101

Default ..

Thanks
r101 is offline  
Old 01-26-2006, 05:44 AM   #2 (permalink)
 
Ultra Techie

Join Date: Jul 2005

Posts: 530

TheHeadFL

Send a message via AIM to TheHeadFL
Default

This looks like simple computer architecture stuff, so I think I can help.

What it is asking for is for you to step through the memory, with the program counter starting at 00000. Therefore, this memory location is interpreted as an instruction.

I read it as:

Opcode: STAM - Store Accumulator in Memory (001) Operand: 00111

This means you store the contents of the accumulator (presumably initially zero) in the memory address 00111.

The next instruction would be

Opcode: LDAI - Load Accumulator Immediate (011) Operand: 00110

This means you load the immediate operand into the accumulator. Therefore, the accumulator would get the value 6 (00110).

Opcode: ADDI - Add Immediate (101) Operand: 11101

This means you add the immediate operand (11101 - Decimal 29) to the contents of the accumulator (00110 - Decimal 6) and store the result (100011 - Decimal 35) in the accumulator.

You see?
__________________
Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache)
TheHeadFL is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On