Explain how computers use binary to represent data
(numbers, text, sound, graphics) and program instructions.
What is maximum and minimum number of states
that can be represented by a binary pattern of a given
length any given length?
The maximum number of states that can be represented by a binary pattern of a given length is 2^n, where n is the length of the binary pattern.
How do computers represent and manipulate
unsigned integers and two’s complement signed integers?
Unsigned integers are represented in binary form, with each bit representing a power of two. For example, the number 10 would be represented as 1010 in binary.
Two’s complement signed integers (negative numbers) are also represented in binary form, but with the most significant bit representing the sign of the number. For example, the number -10 would be represented as 1111 0110 in binary. To manipulate two’s complement signed integers, the computer first converts the number to its absolute value, then performs the desired operation, and finally applies the sign bit to the result.
Convert these denary integers to 8-bit binary:
0
255
-128
127
0 = 00000000
255 = 11111111
-128 = 10000000
127 = 01111111
Add the following two positive binary patterns, apply correct logical gate (and) then perform arithmetic binary shifts of +1
Positive Binary Pattern 1: 10101
Positive Binary Pattern 2: 11011
Example:
Positive Binary Pattern 1: 10101
Positive Binary Pattern 2: 11011
Adding the two binary patterns together:
10101
+11011
——
101000
Applying a logical shift to the result:
101000»_space; 1
Result:
110100
What is overflow in relation to the
number of bits available to store a value? Can you give an example of this?
Overflow is when the number of bits available to store a value is not enough to represent the value. This can cause the value to wrap around to a negative number or an incorrect value.
Convert hexadecimal to binary and binary to hexadecimal give an example of both (Make up your own example)
Hexadecimal to Binary:
Example:
Hexadecimal: A3
Binary: 10100011
Binary to Hexadecimal:
Example:
Binary: 11010101
Hexadecimal: D5
How do computers encode characters using 7-bit
ASCII ?
-The numerical values range from 0 to 127 and each character is assigned a unique numerical value. For example, the letter “A” is represented by the binary number 01000001, which is equal to the decimal number 65.
How are bitmap images are represented in binary
(pixels, resolution, colour depth)?
Example, a 24-bit image uses 8 bits to represent each of the red, green, and blue components of each pixel, allowing for up to 16.7 million colors.
Give two examples of how computers use hexadecimal numbers.
Can analogue sound be represented in binary data?
What are some limitations of binary representation?
In Binary what is a bit, nibble, byte, kilobyte, megabyte, gigabyte?
They are types of data storage, measured in binary multiples (bit, nibble, byte, kilobyte, magabyte, gigabyte,
terabyte) this is used for
file sizes and data capacity requirements.
What is data compression? Give two methods for compressing data.
Data compression is the process of reducing the size of a file or data set by encoding information using fewer bits than the original representation.
There are two methods for compressing data: