writerveggieastroprof
My Journal

Previous Entry :: Next Entry

Mood:
Near Exhausted with Their Repeated Questions

Read/Post Comments (0)
Share on Facebook



Belatedly the Basic Concepts Are Emphasized

Student "edition" found at {csi dot journalspace dot com}.

Maybe I shouldn't have started this blog now, not with everything that's been going on.

My Assembly language class met in a classroom for our most recent session, not only because most of what I wanted to discuss was going to take up more than one board that we had at the lab, but also because the lab was closed in the first place, as the technician was absent for the second day in a row.

First, to stave off any future questions about whether a specific numerical value would fit in an n-bit register, I reminded them of the formula for getting the maximum value, which they were taught in Switching Theory class, for some, just last term.

Since we are only dealing with two registers most of the time anyway, they should already know by heart that an 8-bit register has a maximum value of 255, and for 16-bit, 65535. For 32-bit, which is up to 4 billion, they don't need to remember the maximum.

One student even told me that he thought the bits discussed in our class was different from the bits discussed in Switching Theory.

Next, I gave them the shortcut of how to combine two 8 bit numbers and come up with the 16 bit equivalent, or 16 and 16 to 32 bit.

The standard way is to convert them to binary then back to decimal.

One student, whose scientific calculator allows for hexadecimal conversion, switches them to base 16 first, then back to decimal.

But the easiest way, without using any conversion, is to multiply the upper 8 bit value by 256 then add to the lower 8 bit value.

For 32 bits, it's upper 16 bits times 65536 plus lower 16 bits.

Then I taught them the reverse, which is how to assign a 32-bit number into two 16 bit registers. For this, they have to divide by 65536 first, get the integer result which is the higher 16 bits, subtract it from the answer to retain the decimal value, then multiply that to 65536 again to get the lower 16 bits.

Afterwards I taught them how to add two 32 bit numbers using four 16 bit numbers, and using the add with carry command, and we had one example for which I filled out the execution table.

Session 1703 has no excuse now to ask questions which should be in the notes. Class dismissed.


Read/Post Comments (0)

Previous Entry :: Next Entry

Back to Top

Powered by JournalScape © 2001-2010 JournalScape.com. All rights reserved.
All content rights reserved by the author.
custsupport@journalscape.com