Category Archives: 6. External Sites

Homework for 13th Nov.

SQA 2007 Q17

17. John uses his digital camera to take photographs. It has a 512 Megabyte
memory card. His camera uses 16,777,216 colours and is set to a resolution of
3000 × 2000 pixels.
(a) (i) Calculate the file size of a single image. Your answer should be in
appropriate units. Show all working.
(ii) What is the maximum number of images of this size that can be
stored on John’s memory card?
(b) State two reasons why digital images are stored as JPEGs.
(c) He changes the setting in his camera to reduce the bit-depth.
Describe one effect that this will have.
(d) He connects his camera to his computer. One function of the interface is
the handling of status signals. Describe what is meant by the term “status
signals”.
(e) There are a large number of pictures on his hard disk. The combined size
of all of his photographs is 3 Gb.
He can use a solid-state storage device or Rewritable DVD to take all of his
photographs to his chemist shop for printing. Recommend one of these
devices and justify your choice.

Scanners

OK, I admit it I went on a little about this 🙂

Here is a good post on the working of a scanner and in researching it I found that the video (below) in question was correct for colour CCDs.

[kml_flashembed movie="http://www.youtube.com/v/ZTWQbeE82HU" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]

We will look at CCDs in more detail in next weeks lesson.

Here is a take apart that shows a LED scanner in more detail 🙂

[kml_flashembed movie="http://www.youtube.com/v/AuMkpaenqm8" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]

An excercise in fustration

I thought long and hard about today’s task, I set out to make a task that appeared easy to complete but without the correct design would prove to be frustrating.
The task below has been broken down so you need to follow it from start to finish and constantly revisit “finished” parts of the program, this is the iterative nature of programming.

1. Design and create a program that
a. Stores 20 class marks before displaying them and displaying the average to one decimal place.
b. Change the design and program to validate the marks (between 1 & 100) using the supplied function.
c. Change the design and program to also store the names of the students and then display the output in a two column report.

I’ll post the (1c) solution up tomorrow after class, the code for the function is after the break.

Continue reading An excercise in fustration

DIM

DIM is used to dimensionalise a variable, that is set memory aside for the variable to be stored. It is used thus

  • DIM Number1 as Integer
  • DIM Number2 as Integer

However this can be shortened to

  • DIM Number1, Number2 as Integer

In this case VB(Express Edition) sets number1 & number2 to integers. A more complex example can be seen below

  • DIM StrName as String
  • DIM Number1, Number2 as Integer

Becomes

  • DIM StrName as String, Number1, Number2 as Integer

You need to be careful that you get your syntax correct. It might be easier at the start to stick with the traditional(top) method.

Computer Structure – Main Memory

OK I may have went a little overboard on EEPROM 🙂 but it is very very useful. Some of you might think that EEPROM and flash memory is the same thing but you would be wrong. Have a look at this from webopedia

Pronounced double-ee-prom or e-e-prom, short for electrically erasableprogrammable read-only memory. EEPROM is a special type of PROM that can be erased by exposing it to an electrical charge. Like other types of PROM, EEPROM retains its contents even when the power is turned off. Also like other types of ROM, EEPROM is not as fast as RAM.

EEPROM is similar to flash memory (sometimes called flash EEPROM). The principal difference is that EEPROM requires data to be written or erased onebyte at a time whereas flash memory allows data to be written or erased inblocks. This makes flash memory faster.