Two's complement uses −128 in left-most bit position
Shifting binary numbers left is the same as multiplying by factors of 2
Shifting binary numbers right is the same as dividing by factors of 2
The binary number system is chosen because it consists of 1s and 0s only which correspond to ON and OFF states in the computer system
Binary number system
Based on the number 2, can only use the two values 0 and 1 (bits)
Denary number system
Base 10 number system
Converting from hexadecimal to binary
Write the 4-bit binary code for each hexadecimal digit
Converting from hexadecimal to denary
Multiply each hexadecimal digit by its heading value and add them together
Converting from denary to hexadecimal
Carry out successive divisions by 16 until zero value results, read the remainders from bottom to top
Uses of the hexadecimal system
Error codes
MAC addresses
IP addresses
HTML colour codes
Binary addition
Involves a carry and a sum for each of the 2 or 3 bits being added
Overflow occurs if the result of a calculation is too large for the allocated word size
Logical binary shifts
Shifting (moving) bits to the left (multiplying by 2 for each shift) or the right (dividing by 2 for each shift)
Two's complement
Allows for the representation of negative integers
The right-most bit in two's complement represents -128
Converting denary numbers into binary in two's complement format
Place 1-bits in the appropriate position remembering that the right-most bit now represents −128
Two's complement notation
Allows for the possibility of representing negative integers
Converting negative denary numbers into binary in two's complement format
One method: Put 1-bits in their correct places
Another method: Write the positive binary value, invert each bit, then add 1
The binary representation of −67 in two's complement format is 10111101
Shifting a binary number left by two places is equivalent to multiplying by 22 = 4
Shifting a binary number right by two places is equivalent to dividing by 22 = 4
Adding 220 (in binary) to 44 (in binary) results in an overflow error as the sum exceeds the maximum 8-bit value of 255
To convert a positive denary number to two's complement binary, invert the bits and add 1
Lossy file compression
File compression algorithms eliminate all unnecessary data and the original file can no longer be reconstructed; some data is irretrievably lost
Lossless file compression
Data from the original uncompressed file can be reconstructed following application of the lossless compression algorithms; no data is lost
Examples of lossy and lossless compression
Lossy: MPEG, JPEG
Lossless: Run Length Encoding (RLE)
Data skewing
Bits arrive at their destination no longer synchronised
USB-C connection
The latest type of USB connector, which uses a totally symmetrical 24-pin USB connection, so it will fit into a USB port either way round since there is no up or down orientation
Parallel data transmission
Data is being sent 8 bits at a time down eight wires in one direction only
Half-duplex data transmission
Data is being sent in both directions, one bit at a time along a single wire, but not at the same time
Data is being sent 16 bits at a time along 16 individual channels in both directions simultaneously
Data is being sent one bit at a time down a single wire; the transmission occurs in both directions simultaneously
Errors can occur during data transmission due to electrical interference, packet switching, and skewing of data
Parity check
A method used to check whether data has been changed or corrupted following data transmission
Checksum
A method used to check if data has been changed/corrupted following data transmission
Echo check
Requires data to be sent back to the sending computer where it is compared with the data originally sent
Echo check is not a very reliable method for detecting errors as it is unclear where the error occurred
Check digits
Used to identify any errors following data entry
Automatic Repeat Request (ARQ)
A way to check data following data transmission, often used by mobile phone networks to guarantee data integrity
ARQ uses positive and negative acknowledgements and timeout to detect and correct errors
When data is transmitted over public networks, there is always the risk of it being intercepted. Using encryption and encryption keys helps solve this problem or certainly makes it more difficult for the hacker
Encryption alters the data into a form that is unreadable by anybody for whom the data is not intended