Show Menu
Cheatography

CSSE2010 Cheat Sheet (DRAFT) by

UQ CSSE2010 Introduction to Computer Systems Exam Cheatsheet

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Radices

Binary Arithmetic (Examples)

Signed (8 Bit)
1's Comp (8 Bit)
2's Comp (8 Bit)
No.
10100111
11011000
11011001
-39
10101101
11010010
11010011
-55
11000101
10111010
10111011
-69
2's Comp: Flipped Binary when -ve, +1
1's Comp: Flipped Binary when -ve
(2 Zeros: 0000 and 1111)
Signed: MSB Flipped when -ve

Binary Formats: N-Bit Number
Excess-2(N-1): -2(N-1) <= x <= (2(N-1) -1)
2's Comp: -2(N-1) <= x <= (2(N-1) -1)
1's Comp: -(2(N-1) -1) <= x <= (2(N-1) -1)
Signed­-Mag: -(2(N-1) -1) <= x <= (2(N-1) -1)
Unsign­ed-Mag: 0 <= x <= 2N - 1
 

Binary Coded Decimal (BCD)

Structure:
- Each decimal digit (0–9) is repres­ented by a 4-bit binary number.
- BCD represents multi-­digit numbers by encoding each digit indivi­dually in binary.
- Valid BCD values: 0000 to 1001 (0–9).
- Invalid BCD values: 1010 to 1111 (10–15).

Conver­sion:
Decimal to BCD
1. Split number into individual digits
2. Convert each digit to 4-bit binary
e.g. 3579 -> 3 5 7 9 -> 0011 0101 0111 1001

BCD to Decimal
1. Group the BCD bits into 4 chunks
2. Convert each chunk to a decimal digit
e.g. 0011 0101 0111 1001 -> 3 5 7 9 -> 3579

Minimum D Flip-Flops
- 1 D flip-flop stores 1 bit.
- Each BCD digit = 4 bits.
- For an N-digit decimal number:
-- Minimum flip-flops = 4 × N
e.g. 3579 = 4 digits -> 4x4 =16 flip-flops