convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice
versa
diagram
two 8-bit binary integers and explain
overflow errors which may occur
both numbers are small enough to fit
within 8 bits, but when they're added
together, they 'overflow' into 9 integers,
and will not fit within 8 bits.
convert positive denary whole
numbers (0-255) into 2-digit
hexadecimal numbers and vice
versa
diagram
convert between binary and hexadecimal
equivalents of the same number
diagram
Units
Bit = a single binary digit
Nibble = a sequence of 4 bits
Byte = a
sequence of 8 bits
Kilobyte = approximately 1000 bytes
Megabyte = about 1000 kilobytes or
1,000,000 (one million) bytes
Gigabyte = about 1000 megabytes or
1,000,000,000 (one billion bytes)
Terabyte = approx.
1000 gigabytes or
1,000,000,000,000
(one trillion) bytes
Data needs to be
converted into binary to be
processed by a computer,
that is why this information
is a necessity to know.
Binary logic
Why is data in computers represented in binary form?
Computer componentts often have two states
that can easily model 1 and 0. A magnet on a
hard disk can either be aligned north or south
and a circuit cam be either open or closed.
Binary is high tolerance, it is unlikely that a computer could
mistake a 1 for a 0, in the same way that a computer could
easily mistake a 4.26 for 4.27 if, say, a computer used
different voltages to represent more than 2 numbers.
Logic gates
NOT
OR
AND
Example of a logic gate
w/ truth table
Characters
A character set is a defined list of characters
recognized by the computer hardware and software.
Each character is represented by a number. The
ASCII character set, for example, uses the numbers 0
through 127 to represent all English characters as
well as special control characters. European ISO
character sets are similar to ASCII, but they contain
additional characters for European languages.
ASCII
When using the seven
bits-per-character setting, it is
possible to only send the first
128 characters (0-127) of the
Standard ASCII character set.
Each of these characters is
represented by seven data
bits. The eight
bits-per-character setting
must be used to send the
ASCII Extended character set
(128-255). Each of these
characters may only be
represented using eight data
bits.
Unicode
As opposed to ASCII, which only
contains a maximum of 7 or 8 bits per
character, Unicode contains 16 bits, or 2
bytes!
There is a table in computer (used by BIOS) tells which byte what symbol represents.
When you press a key (for example "A"), keyboard interrupt is fired and BIOS or
Operating System reads one byte (0x41) from keyboard buffer. After that BIOS or
Operating System is asked to write in on keyboard buffer. After that BIOS or Operating
System is asked to write in on screen. Because we tell them to draw a character on the
screen they look on the table to check the entry for (0x41) in ASCII table and it writes
that information to video buffer. After screen is refreshed we see "A" character on he
screen. The entry of table will tell what pixels in some predefined square of screen
should be colored white and which black.
Images
The more colour depth an image has and the
higher the resolution of an image, the larger the
size of an image file.
Simply put, metadata is data about data. It is descriptive
information about a particular data set, object, or
resource, including how it is formatted, and when and by
whom it was collected.
It is necessary because it helps
to support archiving and
preservation. Provenance
information, such as height,
width, and colour depth, aids the
long term preservation of
repository content.
All bitmap images are stored as an array of pixels. A monochrome
bitmap will store a 1 for a black pixel and 0 for a white pixel (or vice-versa
depending on the encoding protocol). If the image were in colour, using a
colour palette of 256 possible shades, each pixel would need to translate
to a value between 0 and 256 (8 bits). Thus we would need 35 bytes to
store the image. It is common for colours to be recorded by quantity or
Red, Green and Blue (RGB) and this is stored using 3 bytes per pixel – so
we would need 105 bytes to store the image.
Sound
In order to store sound digitally, the voltage is sampled at frequent intervals (typically 48 000 times per second,
or 48kHz) and stored as a binary code (typically 16 or 32 bits per sample).
Diagram of sampling
Sample Rate: By reducing the
sample rate (e.g. to 22kHz), you
reduce the amount of data you need
to store. This has quite serious
effects on the quality of the audio.
Sample Depth: Much as with colour, you can
reduce the precision of each datum, using only 8
bits per sample instead of 32, for example.
Instructions
Our CPU processes instructions and data. It receives orders from the software. The CPU is fed a gentle
stream of binary data via the RAM. These instructions can also be called program code. They include the
commands which you constantly – via user programs – send to your PC using your keyboard and mouse.
Commands to print, save, open, etc. Data is typically user data. Think about that email you are writing. The
actual contents (the text, the letters) is user data. But when you and your software say “send”, your are sending
program code (instructions) to the processor:
Even the incredibly simple microprocessorwill have a fairly large set of
instructions that it can perform. The collection of instructions is
implemented as bit patterns, each one of which has a different meaning
when loaded into the instruction register.
Humans are not particularly good at remembering bit
patterns, so a set of short words are defined to represent
the different bit patterns. This collection of words are
called the assembly language of the processor. An
assembler can translate the words into their bit patterns
very easily, and then the output of the assembler is
placed in memory for the microprocessor to execute.