A Cookie's Life

Warning: This is mostly a crappy blog. Crappers and crap-accepting folks alike: Welcome! To all others: Warning. Danger! Keep Out! Read On At Your Own Risk! The author shall by no means be liable for any damage caused directly or indirectly, implicitly or explicitly as a result of the reading of the contents of this blog.

Thursday, November 20, 2008

Smoke Gets In Your Eyes =|

Nope, I'm not about to spoof another set of lyrics here, but, with the crappy lecturer (that is not computer trained) teaching computer architecture (the internal components and workings of a computer), one cannot help but be exasperated after being smoked like crazy... especially if one has been programming for over 10 years and learnt computer architecture for 2 years.

Just some background information... a kilobyte is 1024 bytes, 8 bits make a byte, a word is made up of a number of bits which could be 4, 8, 16, 32, 64... etc. And so, the question was how many kilobytes is a 32K word x 4 bit equivalent to? From my computer science knowledge, in computers, all K = 1024. So, we have:

No of Kilobytes = 32 x 1024 x 4 bits per word / 8 bits per byte / 1024 bytes = 16 Kb. (My answer)

My prof's answer: No of Kilobytes = 32 x 1024 / 1000.

I wonder what happened. And so I emailed my prof, bringing to his attention the obvious errors (probably known only to me in my course) he had and the above question.

This is the email correspondance that I suffered (please read from bottom-up):

From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Glass Cookie]
Subject: RE: General Enquiry
Dear [Filtered],

I can only tell you that my questions contain no calculations.

Good luck!

Regards,
[Filtered]

From: [Glass Cookie]
Sent: Thursday, November 20, 2008 5:50 PM
To: [Filtered] (Assoc Prof)
Subject: RE: General Enquiry

Hi Prof,

Will we be tested on such questions in the exams? If we are, I pretty much have to get to the bottom of this...

Best regards,
[Glass Cookie]


From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Glass Cookie]
Subject: RE: General EnquiryDear [Filtered],

You may come to see me after exam for clarification if you want. You should move on to other topics on your course.

Regards,
[Filtered]

From: [Glass Cookie]
Sent: Thursday, November 20, 2008 5:37 PM
To: [Filtered] (Assoc Prof)
Subject: RE: General Enquiry

Hi Prof,

Hmmm... then why shouldn't the answer for q14 be 32K words * 4 bit per word / 8 bits per byte = 16 kilobytes but rather, 32*1024/1000? If K refers to strictly units of 1024, how could 32X1024 4-bit words be equal to 32 KB?

Best regards,
[Glass Cookie]

P.S. Thank you for all your time

From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Glass Cookie]
Subject: RE: General Enquiry

Dear [Filtered],

A kilobyte is 1024 bytes or 1000 bytes depending on the context used. A byte is 8 bits. A nibble is 4 bits. A word can be of any length of bits. You may check out the link
http://en.wikipedia.org/wiki/Kilobyte. I did not cover the organization of the memory chip in depth.

Regards,
[Filtered]


From: [Glass Cookie]
Sent: Thursday, November 20, 2008 5:26 PM
To: [Filtered[ (Assoc Prof)
Subject: RE: General Enquiry

Hi Prof,

Since you've neglected the 4 bit per word in the calculation of the total number of kilobytes, can it be interpreted that in some cases, a kilobyte consists of 512 bytes instead of 1024 bytes or a byte consists of 4 bits? Because that was the very exact way that they interpreted the question: each word=4 bits, 32K words=32*1024 words. Hence no of kilobytes=32*4/8bits as a byte is defined as 8 bits.

Best regards,
[Glass Cookie]

From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Glass Cookie]
Subject: RE: General Enquiry
Dear [Glass Cookie],

Yes, it is possible as your computer friend has a different interpretation of the question. The tutorial question that I posed may be a bit of confusing depending on the context used. The question refers to a memory chip that can contain 32K of words. Each word is 4 bits. That is the interpretation in the context of the reference book that I used for the course.

Regards,
[Filtered]

From: [Glass Cookie]
Sent: Thursday, November 20, 2008 4:55 PM
To: [Filtered] (Assoc Prof)
Subject: RE: General Enquiry

Hi prof,

From what I gather from my computer engineering friends, if it is to be in kilobytes, the answer should be 32 * 1024 * 4 bits / 8 bits / 1024 bytes = 16 KB instead of the 32*1024 bytes answer provided earlier. Any enlightenments? Thank you for your time

From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Filtered]Subject: RE: General Enquiry
Dear [Glass Cookie],

Yes, it can be confusing and ambiguous. You may check out Wikepedia link on kilobyte
http://en.wikipedia.org/wiki/Kilobyte.
In our context, 32K words x 4 bits. Each word stored in the memory is 4 bits. The K means 1000 bytes, but memory storage 1 K should be equaled to 1024 bytes. Thus, the total capacity expressed in bytes should be 32 x 1024 = 32768 bytes which is sometimes shortened to 32KB.

It is good to know that you are all studying for the exam.

Regards,
[Filtered]

From: [Glass Cookie]
Sent: Thursday, November 20, 2008 2:23 PM
To: [Filtered] (Assoc Prof)
Subject: RE: General Enquiry

Hi Prof,

Assuming that for Q14, it was actually in kilobytes (which was I thought it to be anyway), wouldn't 32K words contain 32000 words? And since these 32000 words are 4 bits each, the total number of bits would be 32000 X 4. Since a standard byte consists of 8 bits and a kilobyte = 1024 bytes, shouldn'd the number of KB be 32000 X 4 / 8 / 1024? Sorry... I'm confused... could you explain in a little more detail?

Best regards,
[Glass Cookie]

From: [Filtered] (Assoc Prof)
Sent: Thu 11/20/2008 5:47 PM
To: [Glass Cookie]
Subject: RE: General Enquiry
Dear [Filtered],

Q14: The confusing part may be due to my question. Is it expressed in Kb (kilobits) or KB (kilobytes)? Following the reference book that I used, it is kilobytes. Then the answer would be 32 x 1024 bytes. If it is in kilobits, then the answer would be 32 x 1024 x 4 bits.

Question on instruction set: Yes, you are right that the “next instruction reference” is implicit in the instruction format for the PC system that we are looking at. You don’t have to mention the reference, it would be automatically handled by the control unit. But in some other system, you may want to specify the next instruction reference explicitly. That means you have to specify the memory address where the next instruction is fetched from.

Stack pointer: Yes, it points to the top of the stack. The stack is often accessed via a register called the stack pointer, which also serves to indicate the current top of the stack. Stack pointer is classified as special purpose register. You may check out the link:
http://en.wikipedia.org/wiki/Processor_register.

Hope this helps.

Regards,
[Filtered]


From: [Glass Cookie]
Sent: Thursday, November 20, 2008 2:38 AM
To: [Filtered] (Assoc Prof)
Subject: General Enquiry

Hi Prof,

Please disregard my previous mail as it is duplicated in this mail. I have a few questions that I would like to ask on behalf of the aerospace cohort:

I've got a query with regards to Q14 of your tutorial question. Is the answer: 32 x 1000 x 4 bits_per_word / 8 bits_per_byte / 1024 byte_per_KB? Cause I was told that the actual answer was 32 x 1024 / 1000 and I would like to clarify it and understand it working.

With regards to instruction set, does 'Next instruction reference' refer to control flow instructions (ie. goto , #IF, call statements... etc)? Because if I recall correctly, next instruction addressing operations are handled by the control unit rather than it being an instruction sent to the processor from the programming/program/software side.

As for the stack pointer, I thought that it points to the 'top location' of the stack after the instructions are being 'popped out' after execution rather than the address/location of the last executed instruction?

Could you kindly clarify these queries? Thank you very much for your time =)

Best regards,
[Glass Cookie]


And so, it really makes one wonder why can't he just see what I'm trying to ask him. Was the idea too difficult?

Conclusion: Anti-youniversity airosp*ce is going downhill at this rate... Next time, a sociologist could teach laplace transformation equations for flight mechanics.

Conclusion 2: It's hard not to get smoke in your eyes when profs like that drop smoke bombs (note: not grenades) all over the place.

Conclusion 3: The prof himself is the most confused, I think...



2 Comments:

Blogger Unknown said...

What kind of professors refer their students to Wikipedia for clarification?!

Ah... I know. Village schools ranked 77th by some obscure ranking list which also ranks Malaysia universities in the top 300 i.e. ranking of third world schools.

I digress. Your professor sucks.

12:49 AM  
Blogger Glass Cookie said...

Haha, he really sucks big time. Not only is he unclear about his knowledge of the subject (which I doubt he even realises), the material in the wiki links are the exact same stuff that I've been painstakingly trying to bring across to him. Sigh... it's all going downhill...

No wonder the ranking dropped.

12:52 AM  

Post a Comment

<< Home

List Of My All-Time Big Stunts In M&D

30 Jul 2006 - When Silence Is Golden 2
It's funny how history repeats itself in a different form. This time, I minimised the volume of the keyboard to zero to try out a new song "I believe in miracles". And for yet (again, miraculously, ironically) another bizarre reason that I know not of, I actually turned the volume up WITHOUT knowing - and CONTINUED practising. Somehow the amplifiers were turned off by the sound guys (probably a safety measure against stuntmen like me?) until they could finally silence it no more and suddenly, out of the nowhere (oh, sorry, that would be the keyboard) came a loud note that penetrated the silence. I jerked in shock (very obviously). And yes, once again it's during the announcement time when silence is definitely golden.



04 Jun 2006 - Time and Congregation Waits For No Man
It was another faithful day in church, playing the keyboard for morning service, 9 and 11 a.m. After the 2nd service praise & worship session, it so happened that no one else could make it for the closing song. Well, since I was pretty free, I was asked to play it. So, I went down, charted out the chords, practised the piece in the tabernacle. On my way up the stairs, the first thought in my mind was: "Hey, it's so crowded. I need to get up the stairs. Now, how do I queeeeeze my way through?". The second thought in my mind was: "Hey, why is there a crowd coming down at this time? ... ... ... NOOOOOO!!!!!!" Man, time passes fast when you're practising the piano in church, and painstakingly slowly when it comes to exam pieces.



[No date] When Silence Is Golden
It was during the announcement, when pastor was giving out announcements before the offering song. Silence was observed as the pastor spoke. I retracted my hand from the score folder beyond the keyboard. For some amazing reason, my hand retraction path headed for the keys of the keyboard. And since the word 'fast' to describe the retraction rate was an understatement (for yet another reason I know not of)... you know the rest of the story.



[No Date] When Silence Is... Anything But Golden
Hmmm... once the amplifier on my side was switched off for some reason during praise & worship. And for some other reason that I know not of, I thought that the keyboard sound couldn't be heard. So, I tried pressing some keys. Didn't hear anything - drums were too loud. I proceeded to bang some keys repeatedly until... hmmm... I thought I heard something. Oh oh... ONLY my amplifier was turned off. (Note: Instrument: Brass sect 1, volume - max.)




List Of Other Small Stunts/Experiences In M&D

Fastest Fingers First
As a keyboardist, one usually comes into contact with different instruments within the same piece. It usually varies from strings, brass, violin to organ sounds. The funny thing is that sometimes, it is possible that your mind suddenly goes blank, and when the next instrument is required, I go "Oh no, what's the number combination for brass???!!! Wait wait wait wait...". And as usual, time and tide waits for no man. No. More accurately, a drummer waits for no number-fumbling keyboardist. Yea, that's the description man. Solution (ok, this is not a solution but an undesired consequence): Play a brass part with strings, or an organ part with brass, or none at all.



Cold Fingers
Usually, the atmosphere in the sanctuary is very cold to me. Sometimes, the atmosphere in the sanctuary is deep-freeze cold. Under cold or colder conditions, the fingers may or will harden and lose its dexterity. Then again, stuff could still be played, however stiff the fingers may be (with diminishing quality). Solution? Rub them while resting, or else, take off one playing hand and rub it vigorously without catching too much attention. I mean, what else can i do? I remove both hands when I need them ON they keyboard!!! Oh, I missed out that hand-clapping would be a sure kill to whatever heat you may have desperately tried to generate.



Record Breaker
Well, each week CD-RWs and envelopes used to contain the scores passed to musicians would be recycled. They are returned back to the musician's basket in the metal cabinet so that they can be used again. Of course, each time a person would return his/her envelope and CD used the previous week. Well, just somewhere in the 3rd week of June 2006 I returned a record holding of (prehaps of all-time in Lighthouse Evangelism's 16 years of establishment) of 9 envelopes with 3 missing somewhere at home. Oh well, you can't really blame me cause for the first time in my life, I saw the word "envelope" in the sms reminder about recycling. Or at least I would like to think so, about my first time noticing that word (fingers crossed).



Stubborn Pedal
Do you have any idea what it is like to have a pedal refusing to budge when moved with your feet, only to exceed its ideal position when you decide to set your adjusting strength to "brutal level". At that kind of rate, it just never gets to the position that you want it to be. Last resort: Bend down and move it with your hand just before the drummer starts his 4-beat intro to the next song.



Moving Pedal
Amazingly, although the pedal refuses to budge when you want it to, somehow it also refuses to stay in the spot when you want it to. And the more you pedal, the further it gets away from you no matter how you position your foot. And in extreme cases you may find yourself almost starting to slouch or slip from your seat, not that the keyboardist seat is any immobile than the pedal to begin with. Solution: Try to kick it back (this is the time when the above experience suddenly comes in again). Just what's with the pedal, I wonder?



Confession...
Take a look at the following score:

=)

Well, since strings sound somewhat soft, and somewhat muffled such that demisemiquavers are not to distinct, and considering it does take up time and there are 5 other pieces to go, and considering this is but 2 bars in a 100 bar piece, and considering blah blah blah... sometimes I play just a note. (OK, most of the time, happy?) Hey, I'm not the only keyboardist around guilty right? Someone tell me I'm not the only one... pleeeese....



Inventions
- Metal-coated tea bag to help with the sinking (Edmund Lum)

- Sound-powered telephone (Edmund Lum)

- Sound-powered telephone (Edmund Lum)

- Plug-in phones for plugging into a payphone to call - unable to recieve call. However, 10 cents will still be needed and you pay your monthly phone bills as usual (Edmund Lum)

- A clean dirt-free rubbish chute (Edmund Lum)

- A touchpad keyboard similar to the touchpad on a laptop, with letters on it (Edmund Lum)

- USB-portable touchpad (Edmund Lum)

- A square CD for better storage (Edmund Lum)

- Battery-powered book (Edmund Lum)

- Disposable dustbins (Edmund Lum)

- A "short circuit" switch that help save electricity when there is nobody at home (Edmund Lum)

- A white/black highlighter (Edmund Lum)

- Safety deposit box made of pure diamond for hardness. It is transparent to allow better visual of objects within it (Edmund Lum)

- An optic mouse combined with a decorated ball placed inside like an old-school mouse to allow any surface usage (Edmund Lum)

- DIY handphone to cut cost (Edmund Lum)

- A plastic knife - no rusting and it is lighter (Edmund Lum)

- Quick dry glue, only 0.2 sec of dry time (Edmund Lum)

- Doorless toliet for faster access (Edmund Lum)

- A pen with wider pen hole to prevent that all-time infamous ink jam (Edmund Lum)

- A 5-mm thick paper to prevent paper cut (Edmund Lum)

- Water-proof toilet paper to prevent wetting the entire roll when dropped on a wet floor, or easy breakage (Edmund Lum)

- A thermal panel powered heater (Edmund Lum)

- A faq list for patients who do not want to reply to any visitors (Edmund Lum & Glass Cookie)

- A deodorant that puts people off (Mustard seed)

- An umbrella with a wire connection (to attract lightning) that's earthed (Edmund Lum)

- An earthquake detector that sounds when there's an earthquake (Edmund Lum)

- A water sensor at the shoreline to detect an approaching tsunami (Edmund Lum)

- A energy-saving fridge that switches itself on via a smell senser specially for detecting certain rotting smells (Edmund Lum)

- A fire extinguishing bomb that creates a huge area of vacuum (sounds familiar?) so as to deprive the fire of oxygen (Edmund Lum)

- A solar powered torchlight

- A power-saving exit sign that lights up only when someone is around (Gabriel Goh)

- A self-locking door that locks itself when no one's around and unlocks itself when someone's near (Edmund Lum)

- Pencil lead harder than steel to improve on its fragility (Edmund Lum)

- A water-proof teabag to prevent breakage over long periods of soaking (Edmund Lum)

- A manual powered air conditioner (Glass Cookie)

- A water-sensitive sprinkler (Edmund Lum)

- A auto retractable roof via light and water sensors, hidden in the wall for protection (Edmund Lum)

- An anti-burglary system with the switch and sensor in the same room (Edmund Lum)

- A wooden barbecue pit (Glass Cookie and Edmund Chen)

- An acrylic oil rig and drill bit to save $$$ (Glass Cookie and Edmund Chen)

- A windows based DOS command prompt program (Glass Cookie)

- A wired handphone (Jackson Lum)


Misc
- A birthday breakfast celebration (Glass Cookie and Jackson Lum)

- A domesticated grizzily bear (Glass Cookie, inspired by Amanda Low)