Professional Documents
Culture Documents
Contents: -
1. Number systems
8. Test Data
1. Number systems
1|Page
Hexadecimal to decimal: -
2|Page
Decimal to Hexadecimal: -
Error Codes: -
Numbers refer to the memory location of the error and are usually
automatically generated by the computer.
The programmer needs to know how to interpret the hexadecimal error
codes.
3|Page
Another method used to trace errors during program development is to use
memory dumps, where the memory contents are printed out either on screen or
using a printer. Find examples of memory dumps and find out why these are a
very useful tool for program developers.
IPv6 uses a colon (:) and IPv4 uses decimal point (.)
HTML: -
4|Page
E.g., <h1 style="colour: #FF0000;">This is a red heading</h1>
The different intensity of each colour (red, green and blue) is determined
by its unique hexadecimal value.
Text: -
ASCII: -
Characters are encoded with the use of Character sets. These are a group of
codes that assign a character to a unique bit pattern. Like capital A is 0001
which is a character code. ASCII stands for American Standard Code for
Information Interchange.
Unicode: -
5|Page
However, extended ASCII is not represented all possible characters, so a new
character set called Unicode was developed. ASCII is the subset of Unicode
(they share up to 127)
Unicode used 16 bits for each character, but this has since been expanded. It
currently has 120,000+ characters. It aims to cover all symbols and characters
every used.
Sound: -
There is a speaker. Speakers transmit sound through air as a sound wave and
that’s what we hear. So, we use a microphone to record the sound wave and it
records it into a signal. This signal is represented by different levels of voltage
so as the pressure get more the voltage gets higher and as the pressure gets less
voltage gets lower.
6|Page
44,100 samples per second. So, we have sample it that many times and we put
those numbers into a binary file now that binary file can be obviously be frozen.
So, if we bring that file into the internet and someone can pick it. And now what
they do is digital to analog converter so now it is reconstructing this is kind of
digital file again and then we can make that into an analogue signal we then
feed that into a speaker and the speaker starts vibrating putting out those waves
of sound and that’s what we hear.
Images: -
Adding colour: -
The system described so far is fine for black and white images, but most images
need to use colours as well. Instead of using just 0 and 1, using four possible
numbers will allow an image to use four colours. In binary this can be
represented using two bits per pixel:
00 – white
01 – blue
10 – green
11 – red
While this is still not a very large range of colours, adding another binary digit
will double the number of colours that are available:
7|Page
16 bits per pixel (0000 0000 0000 0000 – 1111 1111 1111 1111): over
65 000 possible colours
The number of bits used to store each pixel is called the colour depth. Images
with more colours need more pixels to store each available colour. This means
that images that use lots of colours are stored in larger files.
Image quality: -
In a low-resolution image, the pixels are larger so fewer are needed to fill the
space. This results in images that look blocky or pixelated. An image with a
high resolution has more pixels, so it looks a lot better when you zoom in or
stretch it. The downside of having more pixels is that the file size will be bigger.
Text files: -
So, it has 31 characters. Each ASCII character has a value of 1 byte. So, it has
31 bytes the text file.
Image files: -
Let’s take a Bitmap Image. Like it has 1600*1200 pixels. So what we do is:
A BMP photo is 1024*512. Calculate the file size of this image in Megabytes.
8|Page
1536/1024= 1.5 Megabytes
This file goes through JPEG compression and is compressed by a factor of 12.
Calculate the new file size in Kilobytes.
Lossy- It says itself that while compressing file data is lost. Data lost can
not be retrieved it is permanently removed. This compression is used in
Images and audio files. When compressing images even a small quality
lost is unnoticeable and it is okay if its lost and at that point of time lossy
compression is very useful.
Lossless- This also says that there would be no data lost during
compression. It means you will get the original file when uncompressed.
This compression technique is used in text files, code scripts and etc…
Especially talking of code scripts, even if a single line or a single word in
a program the code will be malfunctioned so in this time lossless
compression helps a lot.
9|Page
5. Input and Output devices, Data storage
(Memory)
Input devices are devices which get an input from the user and Output devices
are devices which shows an output to the user so in input devices there are
examples like Mouse, Keyboard, Camera, Touch screens and etc… And if you
are watching a video in your phone then your display is output devices, if you
are watching it in a laptop then the monitor.
10 | P a g e
6. Program development life cycle
11 | P a g e
7. computer systems and sub-systems.
12 | P a g e
8. Purpose of give algorithm
13 | P a g e
9. Validation and Verification check
14 | P a g e
10. Test Data
15 | P a g e
11. Dry run algorithm
17 | P a g e
14. Pseudocode and algorithm
18 | P a g e