From 4ef945d8be7bd9e718c4c68a61afa70bed0c3e98 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:48:12 +0200 Subject: [PATCH 01/22] Convert the decimal number 14 to binary. --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 77a3bde94..44da1945c 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -5,7 +5,7 @@ Do not convert any binary numbers to decimal when solving a question unless the The goal of these exercises is for you to gain an intuition for binary numbers. Using tools to solve the problems defeats the point. Convert the decimal number 14 to binary. -Answer: +Answer:1110 Convert the binary number 101101 to decimal: Answer: From 23baf79bd78edfe7e4db6d435e074668c195a573 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:48:50 +0200 Subject: [PATCH 02/22] Convert the binary number 101101 to decimal --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 44da1945c..76fbd3f82 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -8,7 +8,7 @@ Convert the decimal number 14 to binary. Answer:1110 Convert the binary number 101101 to decimal: -Answer: +Answer:45 Which is larger: 1000 or 0111? Answer: From 80e2c03bb921c15e8186158beb2d5a5fb4722ccf Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:49:51 +0200 Subject: [PATCH 03/22] Which is larger: 1000 or 0111? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 76fbd3f82..149b37948 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -11,7 +11,7 @@ Convert the binary number 101101 to decimal: Answer:45 Which is larger: 1000 or 0111? -Answer: +Answer:1000 has a 1 in a higher position than 0111 → 1000 is larger Which is larger: 00100 or 01011? Answer: From 13313cddb0f2b0b809235aaa76b5c16fd7d75285 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:50:25 +0200 Subject: [PATCH 04/22] Which is larger: 1000 or 0111? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 149b37948..d8facd8bc 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -14,7 +14,7 @@ Which is larger: 1000 or 0111? Answer:1000 has a 1 in a higher position than 0111 → 1000 is larger Which is larger: 00100 or 01011? -Answer: +Answer:01011 has a higher leading 1 → 01011 is larger What is 10101 + 01010? Answer: From 0e5d7786cff7d4b55e0c767444c0f9da0ffc417e Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:51:17 +0200 Subject: [PATCH 05/22] What is 10101 + 01010? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index d8facd8bc..cb2251879 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -17,7 +17,7 @@ Which is larger: 00100 or 01011? Answer:01011 has a higher leading 1 → 01011 is larger What is 10101 + 01010? -Answer: +Answer:11111 What is 10001 + 10001? Answer: From dbef9e96020a906331807a307f048943d6c05c4e Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:51:50 +0200 Subject: [PATCH 06/22] What is 10001 + 10001? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index cb2251879..7890359bf 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -20,7 +20,7 @@ What is 10101 + 01010? Answer:11111 What is 10001 + 10001? -Answer: +Answer:100010 What's the largest number you can store with 4 bits, if you want to be able to represent the number 0? Answer: From 980b641df84a819c2244245c83b76389e51e65cf Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:53:47 +0200 Subject: [PATCH 07/22] What's the largest number you can store with 4 bits --- number-systems/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 7890359bf..5af5a157e 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -23,7 +23,8 @@ What is 10001 + 10001? Answer:100010 What's the largest number you can store with 4 bits, if you want to be able to represent the number 0? -Answer: +Answer:All 1s → 1111 += 8 + 4 + 2 + 1 = 15 How many bits would you need in order to store the numbers between 0 and 255 inclusive? Answer: From 0607001758ecaf6b6b399d396d5a4de6a7b9fb9d Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:54:32 +0200 Subject: [PATCH 08/22] How many bits would you need in order to store the numbers between 0 and 255 inclusive? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 5af5a157e..8f380fd44 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -27,7 +27,7 @@ Answer:All 1s → 1111 = 8 + 4 + 2 + 1 = 15 How many bits would you need in order to store the numbers between 0 and 255 inclusive? -Answer: +Answer:255 = 11111111 → 8 bits How many bits would you need in order to store the numbers between 0 and 3 inclusive? Answer: From cc65495bab9b0a5338576482f74d1ea54840c453 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 16:55:27 +0200 Subject: [PATCH 09/22] How many bits would you need in order to store the numbers between 0 and 3 inclusive? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 8f380fd44..029f46820 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -30,7 +30,7 @@ How many bits would you need in order to store the numbers between 0 and 255 inc Answer:255 = 11111111 → 8 bits How many bits would you need in order to store the numbers between 0 and 3 inclusive? -Answer: +Answer:3 = 11 → 2 bits How many bits would you need in order to store the numbers between 0 and 1000 inclusive? Answer: From 7edf74f15d32b0e37e4b967b19f818c8fe780daf Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:02:33 +0200 Subject: [PATCH 10/22] How many bits would you need in order to store the numbers between 0 and 1000 inclusive? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 029f46820..8e2f8186c 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -33,7 +33,7 @@ How many bits would you need in order to store the numbers between 0 and 3 inclu Answer:3 = 11 → 2 bits How many bits would you need in order to store the numbers between 0 and 1000 inclusive? -Answer: +Answer:10 bits How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? Answer: From 21adf412e64dd2d60ff35449f4a15db63c89a8e6 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:05:23 +0200 Subject: [PATCH 11/22] How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 8e2f8186c..74f403350 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -36,7 +36,7 @@ How many bits would you need in order to store the numbers between 0 and 1000 in Answer:10 bits How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...)? -Answer: +Answer:A binary number is a power of two if it has exactly one '1' bit and all other bits are '0'. In other words, a binary number that is a power of two will look like this: 1, 10, 100, 1000, etc. Convert the decimal number 14 to hex. Answer: From 5154363d168ec49a2546052d896a4b49272f4746 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:10:14 +0200 Subject: [PATCH 12/22] convert decimal number to hex --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 74f403350..2c544a568 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -39,7 +39,7 @@ How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...) Answer:A binary number is a power of two if it has exactly one '1' bit and all other bits are '0'. In other words, a binary number that is a power of two will look like this: 1, 10, 100, 1000, etc. Convert the decimal number 14 to hex. -Answer: +Answer:hexadecimal (hex) uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F therefore 14 in decimal = E in hex Convert the decimal number 386 to hex. Answer: From 161a94138fec9f1b8f906ffe9f7c532632284229 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:11:10 +0200 Subject: [PATCH 13/22] Convert the decimal number 386 to hex --- number-systems/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 2c544a568..55fef8e31 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -42,7 +42,13 @@ Convert the decimal number 14 to hex. Answer:hexadecimal (hex) uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F therefore 14 in decimal = E in hex Convert the decimal number 386 to hex. -Answer: +Answer:Divide by 16 repeatedly (because hex is base 16). +386 ÷ 16 = 24 remainder 2 → the last digit is 2 +24 ÷ 16 = 1 remainder 8 → next digit is 8 +1 ÷ 16 = 0 remainder 1 → first digit is 1 +Write the remainders from top to bottom: + +1 → 8 → 2 = 182 Convert the hex number 386 to decimal. Answer: From 78b3ba64c081725b6e9e85e15bb4322f70f930d2 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:12:54 +0200 Subject: [PATCH 14/22] Convert the hex number 386 to decimal. --- number-systems/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 55fef8e31..af047dafb 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -51,7 +51,11 @@ Write the remainders from top to bottom: 1 → 8 → 2 = 182 Convert the hex number 386 to decimal. -Answer: +Answer:Hex is base 16, so each digit represents: +3 × 16² = 3 × 256 = 768 +8 × 16¹ = 8 × 16 = 128 +6 × 16⁰ = 6 × 1 = 6 +Add them: 768 + 128 + 6 = 902 Convert the hex number B to decimal. Answer: From e335e7f597e0116e25bddc3f7b70f5fcd14ee397 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:13:37 +0200 Subject: [PATCH 15/22] Convert the hex number B to decimal. --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index af047dafb..73ea69c7f 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -58,7 +58,7 @@ Answer:Hex is base 16, so each digit represents: Add them: 768 + 128 + 6 = 902 Convert the hex number B to decimal. -Answer: +Answer:B in hex = 11 in decimal If reading the byte 0x21 as a number, what decimal number would it mean? Answer: From df1432c1f2c53443fa47b868fd3963510b92fa9e Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:19:17 +0200 Subject: [PATCH 16/22] If reading the byte 0x21 as a number, what decimal number would it mean? --- number-systems/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 73ea69c7f..08dce1615 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -61,7 +61,10 @@ Convert the hex number B to decimal. Answer:B in hex = 11 in decimal If reading the byte 0x21 as a number, what decimal number would it mean? -Answer: +Answer:0x21 = hex 21 → base 16 +2 × 16 = 32 +1 × 1 = 1 +Add: 32 + 1 = 33 If reading the byte 0x21 as an ASCII character, what character would it mean? Answer: From 9984b8b607e0d30e6c2bf2d00fce644cc82f0f27 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:21:27 +0200 Subject: [PATCH 17/22] If reading the byte 0x21 as an ASCII character, what character would it mean? --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 08dce1615..c3342f613 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -67,7 +67,7 @@ Answer:0x21 = hex 21 → base 16 Add: 32 + 1 = 33 If reading the byte 0x21 as an ASCII character, what character would it mean? -Answer: +Answer: ! If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? Answer: From d4abcb04cde78160586444210fc6a2b0c4a69297 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:23:14 +0200 Subject: [PATCH 18/22] byte 0x21 as a greyscale colour --- number-systems/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index c3342f613..04953c55b 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -70,7 +70,8 @@ If reading the byte 0x21 as an ASCII character, what character would it mean? Answer: ! If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? -Answer: +Answer:Greyscale ranges 0x00 (black) → 0xFF (white) +0x21 is low value, so it’s dark grey If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? Answer: From bf3ae3e5f91e16c641f11a68d3656127c1c97b78 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:26:19 +0200 Subject: [PATCH 19/22] 0xAA00FF as an RGB colour --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index 04953c55b..c4d5396a9 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -74,7 +74,7 @@ Answer:Greyscale ranges 0x00 (black) → 0xFF (white) 0x21 is low value, so it’s dark grey If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? -Answer: +Answer:red + blue → purple/magenta If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be? Answer: From 1669456b3087b3ae22a7ec57c221709e458305f5 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:26:37 +0200 Subject: [PATCH 20/22] RGB colour --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index c4d5396a9..c60e14846 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -74,7 +74,7 @@ Answer:Greyscale ranges 0x00 (black) → 0xFF (white) 0x21 is low value, so it’s dark grey If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Representing Colors and Images", what colour would it mean? -Answer:red + blue → purple/magenta +Answer:red + blue = purple/magenta If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be? Answer: From 0205278ddbaca1805ef4ba62c1764ed1acad0103 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:28:07 +0200 Subject: [PATCH 21/22] sequence of three one-byte decimal numbers --- number-systems/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index c60e14846..dc5892fba 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -77,4 +77,7 @@ If reading the bytes 0xAA00FF as an RGB colour, as described in "Approaches for Answer:red + blue = purple/magenta If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be? -Answer: +AA → 170 +00 → 0 +FF → 255 +Answer: 170, 0, 255 ✅ From b4139c5ece35b78a7b48c5fc15453d63a03595c4 Mon Sep 17 00:00:00 2001 From: theangelskies Date: Thu, 2 Apr 2026 17:28:36 +0200 Subject: [PATCH 22/22] bytes 0xAA00FF as a sequence of three one-byte decimal numbers --- number-systems/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number-systems/README.md b/number-systems/README.md index dc5892fba..b83cb5c95 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -80,4 +80,4 @@ If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, w AA → 170 00 → 0 FF → 255 -Answer: 170, 0, 255 ✅ +Answer: 170, 0, 255