Hardware uses electricity - off or on
Software uses binary - 1 or 0
Both boolean states enable communications between hardware and software
Denary is base 10 (uses 10 different digits)
Binary is base 2 (uses 2 diferent digits)
Hexadecimal is base 16 (uses 16 diferent digits)
Hex is easier for humans to read and remember than binary
Hex used for IP addresses, representing colours etc
1 + 1 = 10
Shift left to multiply
Shift right to divide
ASCII is outdated method of representing key characters
Unicode provides capacity to represent chars from all languages as well as emojis, mathematical and special chars
Sound waves are analogue, to digitise them they must be mapped and measured - AKA sampled
Images and screens are made up of pixels, each pixel stores colour information
Subpixels - RGB LED's
Bitmap is a type of digital image created by mapped bits!
Kilo, gig, mega,tera etc = denary
kibi,mebi,gibi,tebi etc = binary
Computer hardware needs electricity to work.
Electricity exists in 2 forms (boolean) on or off
In order for computer software to work with computer hardware, the software must also be reduced to boolean values. This is achieved using binary. 1's = On, 0's = Off.
Thus, high level programming languages that humans understand (Python, Ruby, Java etc) are translated into low level languages that computers understand (machine code)
Reading long strings of binary numbers and remembering them is not something that most humans are good at. So hexadecimal was created to make it easier for us to work with long binary numbers and also to reduce data storage.
Hex is a base 16 number system which means is uses 16 different digits, this is because one nibble of binary can represent 16 denary numbers, 0000-1111.
0 1 2 3 4 5 6 7 8 9 A B C D E F, IP address, HTML colour codes etc use hex to simplify large binary numbers for us.
By shifting binary numbers to the left we can perform multiplication of binary numbers by 2,4,8,16,32,64,128 etc
By shifting binary numbers to the right, we can perform division of binary numbers by 2,4,8,16,32,64,128 etc
Gaps are filled with zeros when shifting left, and when shifting right, numbers are lost
Two's Compliment is a method used to represent negative binary numbers. Here is a simple algorithm:
Get binary number – 0011 (3)
Invert number - 1100
Add 1 - 1100 + 1 =1101
If the left most bit is a zero add a signed bit - 1101
( -8+4+1 = -3)
ASCII can use the maximum of 8 bits which means it can only represent 256 characters. This is not enough for all the languages in the world and emojis etc
So …
Unicode was invented. It uses hex and can represent over 2 billion characters
Digital images are no more than optical illusions consisting of tiny coloured squares called pixels.
The pixels on our monitors and screens are made up of 3 subpixels, each a different coloured light - Red, Green and Blue.
These lights are informed by the software to shine at different brightnesses. Combined they produce a colour in much the same way as an artist mixes paints on a pallet.
All data on a computer system is represented using binary patterns, which are sequences of 1s and 0s.
In order to represent an image, one method is to store it as if it were a grid of coloured squares, with each colour represented by a unique binary pattern.
The image dimensions and the number of colours used are factors that affect the size of the image file.
A bitmap image is made up of a grid of pixels. A pixel (short for ‘picture element’) is the smallest element in an image. If you magnify an image, you will see that it is made up of these tiny elements.
Image resolution refers to the clarity of an image as it appears on a screen or on paper. It also oftern used to describe the size of a bitmapped image in pixels.
Image resolution can be expressed as the number of pixels that an image contains per inch (e.g. 300 ppi (pixels per inch)).
Bitmap images that require only two colours can be represented by using just one bit per pixel.
If an image needs more than two colours, you will need more bits per pixel. For example, with 2 bits, you can have 2 × 2 = 4 different bit patterns, and so you can represent four different colours. As you can see in the table below, each bit-pattern is assigned a colour.
Sound is a vibration that travels through the air. For a computer to capture sound waves, known as analogue sound, it needs to store the sound in a digital format (sequences of 1,1s and 0,0s). It also needs to recreate and play back the sound that has been captured.
The most common technique used to represent a sound is to take samples (sampling) of the sound at regular intervals. The intervals in which sampling takes place (sample rate), the duration, and the sample resolution (bit depth) all impact the sound quality and size of a file processed by the computer.
The amplitude is the intensity (or height) of the sound wave. It relates to the amount of energy the wave carries and it is measured in voltage (V).
The amplitude can be calculated either from the central point of the wave to its top (crest) or from the central point of the wave to its bottom (trough).
The frequency is the number of completed cycles per second of a sound wave. If the frequency of the sound wave increases, there are more cycles in a second and a higher pitch (note) sound is produced. If the frequency decreases, a lower pitch sound is produced.
The sample resolution, also known as bit depth, is the number of bits used to represent each sample. By increasing the sample resolution, more information on the original analogue wave will be taken.
For example, a sample resolution of 8 bits per sample allows (2 to the power 8) 256 different values
The higher the sample resolution, the more accurate (fidelity) a sound will be recorded. This is because more information from the original sound is captured, which results in a higher quality audio file. However, higher sample resolution leads to larger file size.
Decimal units such as kilobyte (KB), megabyte (MB), and gigabyte (GB) are commonly used to express the size of data.
Binary units of measurement include kibibyte (KiB), mebibyte (MiB), and gibibyte (GiB).
Binary units of measurement express the size of data more accurately. When you compare the size of 100 KB to 100 KiB, the difference is relatively small, 2.35%.
However, this difference grows as the size of the data values increases. When you compare the size of 100 TB to 100 TiB, the difference is 9.06%.
Compression is a technique that reduces file size. Some compression techniques are referred to as lossy, because they cause data to be lost during the compression process. Other techniques are referred to as lossless, because they allow the original data to be exactly reconstructed from the compressed data.
Compression makes file sizes smaller. Some computer files are very large. Local storage can be cheap and plentiful, and sometimes, file size is not an issue. However, if you need to store files on a device with limited capacity (such as a memory card), or transfer the file data over a cable or wireless communications link, large files can be a problem. A smaller file size means that more files can be stored in a fixed amount of storage, and files will be quicker to transfer, upload, and download.