% Author: Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Date: Winter 2011 - January to April 2011 - Updated 2011-03-26 04:25 EDT % Title: Week 08 Notes for DAT2343 - Winter 2011 - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] Second Midterm Test =================== - The Second Midterm Test date is posted on the [Course Home Page]. - The Second Midterm covers material on Assignments 01 through 08 inclusive and Week Notes 01 through 07 inclusive. - For full mark credit, read the [Test Instructions] for important directions on how to enter your answers on the mark-sense forms. Lecture Notes for This Week =========================== From the Class Notes link on the Course Home Page ------------------------------------------------- - [Course Home Page] - [All Weeks] - [Assignment #08] - Bitwise, Boolean, Z+S+C+O flags, LMC Computer - [Assignment #07] - Floating Point, Endian, Shifts, Characters, Booleans - [301_LMC.html] - The “Little Man” Computer - [302_LMC_instruction_cycle.txt] - The Little Man Computer Instruction Cycle - [305_LMC_opcodes.html] - Extended LMC Operation Codes - Opcodes - [306_LMCProgramming.html] - LMC Machine Level Programming - [307_LMC_lights.txt] - LMC Negative Flag Trickery - [310_Comparison_of_the_LMC_and_General_Computer_Models.pps] - - [310_Comparison_of_the_LMC_and_General_Computer_Models.ppt] - - [350_LMC_sample1.txt] - LMC Sample Program #1 - add and subtract - [350_LMC_sample2.txt] - LMC Sample Program #2 - input, add, output - [350_LMC_sample3.txt] - LMC Sample Program #3 - input, add, and loop using a counter - [360_LMC_Simulator.html] - Clone of Son of LMC Simulator - [361_LMC_Simulator_Usage.pps] - - [361_LMC_Simulator_Usage.ppt] - From Blackboard Course Documents -------------------------------- These documents have restricted distribution and cannot be put on the [Course Home Page]. - None From the Internet ----------------- - - convert to/from hexadecimal From the Classroom Whiteboard/Chalkboard ---------------------------------------- - Your in-class notes go here. - What you might need is a Binary Watch - see image. ![Binary Watch (photo courtesy of Lucas)] - bitwise operators: `AND OR XOR NOT` -\> `& | ^ ~` - for any values *a* and *b*, explain what happens after the following two XOR operations (e.g. try a=5,b=10 and see what happens): - `a = a^b` - `a = a^b` - for any values *a* and *b*, explain what happens after the following three XOR operations (e.g. try a=5,b=10 and see what happens): - `a = a^b` - `b = a^b` - `a = a^b` - The LMC (continued) - see the [Class Notes][All Weeks], above - review: instruction cycle (remember the Increment!) - instructions that fail if the Increment is done third instead of second: JMP and CALL - how the JMP and SKZ instructions work with the Counter - use of labels instead of mailbox numbers in writing assembly language - see [350_LMC_sample3.txt] - LMC Sample Program #3 -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [Course Home Page]: .. [Course Outline]: 2010-2011_DAT2343.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week08notes.txt [Test Instructions]: 000_test_instructions.html [Assignment #08]: assignment08.txt [Assignment #07]: assignment07.txt [301_LMC.html]: 301_LMC.html [302_LMC_instruction_cycle.txt]: 302_LMC_instruction_cycle.txt [305_LMC_opcodes.html]: 305_LMC_opcodes.html [306_LMCProgramming.html]: 306_LMCProgramming.html [307_LMC_lights.txt]: 307_LMC_lights.txt [310_Comparison_of_the_LMC_and_General_Computer_Models.pps]: 310_Comparison_of_the_LMC_and_General_Computer_Models.pps [310_Comparison_of_the_LMC_and_General_Computer_Models.ppt]: 310_Comparison_of_the_LMC_and_General_Computer_Models.ppt [350_LMC_sample1.txt]: 350_LMC_sample1.txt [350_LMC_sample2.txt]: 350_LMC_sample2.txt [350_LMC_sample3.txt]: 350_LMC_sample3.txt [360_LMC_Simulator.html]: 360_LMC_Simulator.html [361_LMC_Simulator_Usage.pps]: 361_LMC_Simulator_Usage.pps [361_LMC_Simulator_Usage.ppt]: 361_LMC_Simulator_Usage.ppt [Binary Watch (photo courtesy of Lucas)]: binary_watch.jpg [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/