From jacobson@cns.uni.edu Tue Jan 25 17:35:30 2011 Date: Tue, 25 Jan 2011 17:35:30 -0600 (CST) From: Mark Jacobson To: 810-023-01-spring@uni.edu Subject: TIC Tiny Imaginary Computer group exercise - Fetch/Execute cycle... Hi 023 students, Reminder: StudioIT 1 ITT 134 class on Thursday! Here is the solution to this morning's group exercise of tracing the execution of the TIC program. The final output was just two numbers: 104 208 http://www.cs.uni.edu/~jacobson/23/spr11/TICgroupExercise.pdf Note that the last number left in the PC (Program Counter, aka IAR or Instruction Address Register) would be 19, address 19. The fetch/execute cycle (called machine cycle on today's handout). 1. Fetch the instruction located at memory address PC 2. Increment the PC (add 1 to the PC) 3. Exeecute the fetched instruction Note that the ACC ACCumulator register had 4 different values during the execution of the TIC program: 15, then 52, then 104, then 208 Note that 104 is converted to binary as follows: 104 -64 64 32 16 8 4 2 1 --- 1 1 0 1 0 0 0 40 -32 104 = 1101000 --- 10 2 8 -8 --- 0 Since 64 + 32 + 8 = 104, what would 2 * 64 + 2 * 32 + 2 * 8 = ? 128 + 64 + 16 = 208 1 1 0 1 0 0 0 0 - - - - - - - - Notice that 1101000 = 104 and 11010000 = 208 When you multiply a binary number by 2, you just add a 0 to the binary number and shift all the other digits to the left. So its the same concept as when you multiply 136 by 10. Add a 0 and get 1360 or 1,360 and its as easy as that to multiply by ten in base ten. Notice that 1101000 = 104 and 11010000 = 208 Same concept for multiply by two in base two. http://www.cs.uni.edu/~jacobson/23/spr11/TICgroupExercise.pdf **** Reminder: StudioIT 1 ITT 134 class on Thursday! **** 2nd floor computer lab... Mark ---------------------------------------------------------------------------- On Thu, 20 Jan 2011, Mark Jacobson wrote: > > Hi 023 students, > > In case you need the syllabus and did not get a copy: > > http://www.cs.uni.edu/~jacobson/AE/spr11/syllabus023Spring2011.pdf > > To review what we did today with Flash and audio: > > 1. Watch this video tutorial and take some notes. > > http://www.cs.uni.edu/~jacobson/23/fla/s/vid/FlashSounds.html > > 2. Play with the following example. It has 3 different buttons, > and animation is included with the Audio sound. > > http://www.cs.uni.edu/~jacobson/23/fla/s/vid/022010/soundLesson.html > > Gotta make my URLs be shorter > instead of loooooooooooooooooooonger! > > 3. Look over any of the following pages links that you wish to. > > It is SPRING 2010 page and it is NOT an assignment for > this semester. --- > > It was due on February 28th, 2010 about 11 months ago! :-) > > http://www.cs.uni.edu/~jacobson/23/fla/sound/soundAssign.html > > We will do a portion of the Tuesday class about TIC, the > Tiny Imaginary Computer and the other portion will be about > Flash and buttons and audio concepts to help prepare for > next Thursday's StudioIT 1 lab class. > > We are back in the classroom on Tuesday. > > Mark > >