From 4af8ad8f18c542732d5279e481984938e34490cd Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:33:39 +0000 Subject: [PATCH 1/8] answers to first 3 questions --- number-systems/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index 77a3bde94..c15837cbd 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -5,13 +5,13 @@ 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: +Answer: 45 Which is larger: 1000 or 0111? -Answer: +Answer: 1000 Which is larger: 00100 or 01011? Answer: From f9bc586380fa200e5350a69d19efaf8dd74a57bb Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:37:42 +0000 Subject: [PATCH 2/8] answered questions 4-6 --- number-systems/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index c15837cbd..0102f51e1 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -14,13 +14,13 @@ Which is larger: 1000 or 0111? Answer: 1000 Which is larger: 00100 or 01011? -Answer: +Answer: 01011 What is 10101 + 01010? -Answer: +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 1172e69d93d14f6dc7b7a20837c8830e345b0a57 Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:43:05 +0000 Subject: [PATCH 3/8] answers to other sets of questions --- number-systems/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index 0102f51e1..ddb8dad85 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -23,19 +23,19 @@ 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: 15 How many bits would you need in order to store the numbers between 0 and 255 inclusive? -Answer: +Answer: 8 bits How many bits would you need in order to store the numbers between 0 and 3 inclusive? -Answer: +Answer: 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: +Answer: the most significant bit (on the left) always holds the value 1 while the rest of the bits (on the right) have 0s. Convert the decimal number 14 to hex. Answer: From 85377a7ead7442a4052abf684cb1865b4f7f1eac Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:51:49 +0000 Subject: [PATCH 4/8] answers --- number-systems/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index ddb8dad85..d53ecee74 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -38,10 +38,10 @@ How can you test if a binary number is a power of two (e.g. 1, 2, 4, 8, 16, ...) Answer: the most significant bit (on the left) always holds the value 1 while the rest of the bits (on the right) have 0s. Convert the decimal number 14 to hex. -Answer: +Answer: E Convert the decimal number 386 to hex. -Answer: +Answer: 182 Convert the hex number 386 to decimal. Answer: From 3d14dbdedffc7a7c063d21065ac376554ef2caa8 Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:54:45 +0000 Subject: [PATCH 5/8] answers --- number-systems/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index d53ecee74..0cdce191f 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -44,10 +44,10 @@ Convert the decimal number 386 to hex. Answer: 182 Convert the hex number 386 to decimal. -Answer: +Answer: 902 Convert the hex number B to decimal. -Answer: +Answer: 11 If reading the byte 0x21 as a number, what decimal number would it mean? Answer: From 8e019a590048a67a97ba337a2786d5b372c36d5a Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 07:59:17 +0000 Subject: [PATCH 6/8] answers --- number-systems/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index 0cdce191f..f13b5447e 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -50,13 +50,13 @@ Convert the hex number B to decimal. Answer: 11 If reading the byte 0x21 as a number, what decimal number would it mean? -Answer: +Answer: 528 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: +Answer: A dark shade of 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 fc5b2d6dd3d6ffa81267ab9954671cbe11c5aa3a Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 08:07:48 +0000 Subject: [PATCH 7/8] answers to the final set of questions --- number-systems/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/number-systems/README.md b/number-systems/README.md index f13b5447e..9c518d4d4 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -59,7 +59,7 @@ If reading the byte 0x21 as a greyscale colour, as described in "Approaches for Answer: A dark shade of 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: A bright shade of purple If reading the bytes 0xAA00FF as a sequence of three one-byte decimal numbers, what decimal numbers would they be? -Answer: +Answer: 170, 0, 255 respectively From fd9391a8e059f898cab6d28b7fd81dbd8fff02f7 Mon Sep 17 00:00:00 2001 From: HassanOHOsman Date: Sun, 9 Nov 2025 08:10:28 +0000 Subject: [PATCH 8/8] correction to question 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 9c518d4d4..2e2d50400 100644 --- a/number-systems/README.md +++ b/number-systems/README.md @@ -50,7 +50,7 @@ Convert the hex number B to decimal. Answer: 11 If reading the byte 0x21 as a number, what decimal number would it mean? -Answer: 528 +Answer: 33 If reading the byte 0x21 as an ASCII character, what character would it mean? Answer: !