What is the binary number system?
Base 2 system using only 0 and 1, with place values as powers of 2 (e.g. 128,64,32,16,8,4,2,1 for 8 bits).
Why do computers use binary?
Switches are ON (1) or OFF (0), so binary matches computer’s hardware logic gates and storage.
How to convert binary to denary?
Add place values (powers of 2) where there is a 1. E.g. 11101110 = 128+64+32+8+4+2 = 238.
Denary to binary Method 1?
Successive subtraction of largest possible powers of 2, write 1 if subtractable, 0 if not.
What is hexadecimal?
Base 16 system using 0–9 and A–F (A=10, F=15), place values powers of 16.
Binary to hex?
Group into 4 bits from right, convert each group (e.g. 1111=F).
Hex to binary?
Each hex digit to 4-bit binary (e.g. F=1111).
Hex to denary?
Multiply each digit by power of 16, sum (e.g. 45A: 4×256 + 5×16 + 10×1 = 1114).
Denary to hex?
Repeatedly divide by 16, remainders bottom to top (10–15 as A–F).
What is a MAC address?
48-bit hex identifier for network card: NN-NN-NN-DD-DD-DD (manufacturer + serial).
What is an IP address?
Unique network address. IPv4: 32-bit (e.g. 109.108.158.1). IPv6: 128-bit hex groups.
How does HTML use hex?
RRGGBB for RGB colours (FF0000=red, 00FF00=green).
What are the uses of hexadecimal?
.
What are the advantages of using hexadecimal representation?
.
How many unique numbers can be represented in a n bit binary number?
2^n
What is the largest possible number that can be represented by n bit binary number?
2^n-1
what is the smallest and largest 8 bit number that can made in 2s complement? (binary and denary)
.
Binary addition rules?
0+0=0 c0; 0+1=1 c0; 1+0=1 c0; 1+1=0 c1 (carry 1).
What is overflow in 8-bit addition?
Carry out of MSB when result >255 (e.g. 240+48=288 → overflow). And an extra bit gets generated from the availible bits
Logical left shift effect?
Multiplies by 2^n (bits shift left, 0s in from right, MSB lost if overflow).
Logical right shift effect?
Divides by 2^n (bits shift right, 0s in from left, LSB lost).
What is two’s complement?
Method to represent signed 8-bit integers (−128 to +127). MSB=sign bit.
Positive denary to 8-bit two’s comp?
Convert to binary, pad to 8 bits (MSB=0).
Negative denary to two’s comp?
Take positive binary, invert bits, add 1.