Premium Chapter

Digital logic & number systems

Computer Science & Applications (Paper 2) (Code 87) · Unit 2 · ~17 min read · Original chapter

Free previewPremium full chapter

Free preview

All digital hardware speaks one language: binary, where every value is a string of 0s and 1s. Boolean algebra is the mathematics of that language, with AND, OR and NOT as its operations and laws like absorption (A + AB = A) that simplify circuits. Worked example: convert 25 to binary by repeated division by 2 — remainders from bottom to top give 11001, and 11001 = 16 + 8 + 0 + 0 + 1 = 25. Negative numbers use two's complement: to represent -7 in 8 bits, write 7 as 00000111, invert to 11111000, add 1 to get 11111001 — and this representation makes subtraction work as addition, which is why hardware uses it.

Checking premium access…