• Check it out - we have a chatbot! Go ask TuxBot a question in the Ask Tuxbot section!

Stuck on a Binary Quiz

davidd

Member
Joined
Sep 16, 2022
Messages
56
Reaction score
16
Credits
498
I am completely stuck on this binary quiz for a course I am doing but I suck at math I was hoping someone could use gimp to mark the correct answers for me or I will spend eternity on getting passed this.
0test.png

1.png

Screenshot from 2023-02-08 18-49-49.png
 


KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,580
Reaction score
7,328
Credits
69,748
A 1 means it includes that value. A 0 means it does not include that value. The total of those values should match (from what I can see) the numbers to the left.

64
32
8
1

Added together, those make 105.

Those places get a 1 and the rest get a 0.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,580
Reaction score
7,328
Credits
69,748
I take it the green means you got it right?

It's really not all that hard. It's either a 0 or it's a 1. The value is the accumulated total of the values marked with a 1.

By the way, this binary exercise is also a good way to envision the limitations of 128 bit, 64 bit, 32 bit, and 8 bit.
 
OP
davidd

davidd

Member
Joined
Sep 16, 2022
Messages
56
Reaction score
16
Credits
498
I'm taking the Google technical support certification course. We just basically a course on the fundamentals of a technical support r































 

sphen

Well-Known Member
Joined
Dec 12, 2022
Messages
335
Reaction score
341
Credits
4,054
This write up is straight from the top of my head to this page, okay? After the procedure is an example showing how it works. I hope people like it.

Procedure to Convert a Decimal Number to Binary
Assumptions: Range is 8 bits = decimal numbers from 0-255. The binary digits (bits) are 128, 64, 32, 16, 8, 4, 2, and 1.

a. For every bit (binary digit) that is larger than your original decimal number, write a zero ("0").
b. Write a one ("1") for the first bit that matches or is smaller than your original decimal number.
c. Subtract that "bit" from your decimal number to get a remainder.
d. If the remainder is zero (0) then you are done. Write a zero ("0") for all the smaller bits and stop.
e. Otherwise, take the remainder and keep going with the same process. For every binary digit that is larger than the remainder, write a "0".
f. Write a one ("1") for the first bit that matches or is smaller than your remainder.
g. Subtract that "bit" from your remainder to get a new remainder.
h. If the new remainder is zero (0) then you are done. Write a zero for all the remaining smaller bits.
i. Repeat steps "e" through "h" for each new remainder that is not zero.

Example - If your number is "22":
a. Write a zero ("0") for the bits 128, 64, and 32 because those bits are larger than 22.
b. Write a one ("1") for bit 16 because 16 is the first bit that is matches or is smaller than 22.
c. Subtract 22 - 16 = 6. Your new remainder is 6.
d. The remainder is 6, not zero. Keep going.

e[1]. Write a zero ("0") for bit 8, because 8 is larger than your current remainder 6.
f[1]. Write a one ("1") for bit 4, because 4 is the first bit that is matching or smaller than your current remainder 6.
g[1]. Subtract 6 - 4 = 2. Your new remainder is 2.
h[1]. The new remainder is 2, not zero.
i. Go back to step e (step "e(2)", below) with your new remainder, 2.

e[2]. There are no bits left that are larger than your new remainder, 2.
f[2]. Write a one ("1") for bit 2, because bit 2 matches your current remainder 2.
g[2]. Subtract 2 - 2 = 0. Your new remainder is 0.
h[2]. The new remainder is zero after subtracting the two bit, so you are done. Write a zero ("0") for the 1 bit and you have your answer.

Answer: 22 = 00010110 (128=0, 64=0, 32=0, 16=1, 8=0, 4=1, 2=1, 1=0)
 

CrazedNerd

Well-Known Member
Joined
Mar 31, 2021
Messages
1,151
Reaction score
526
Credits
9,926
A 1 means it includes that value. A 0 means it does not include that value. The total of those values should match (from what I can see) the numbers to the left.

64
32
8
1

Added together, those make 105.

Those places get a 1 and the rest get a 0.
Yeah, even though the doing powers in your head (like you would have to without the interface in the pictures) is not very simple, it makes it really easy just to imagine each number as some sort of switch, and then you just use the switches to add up the sum on the left.
 
Last edited:

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,580
Reaction score
7,328
Credits
69,748
I'm taking the Google technical support certification course.

Good luck! Make sure to understand each section before moving on.

it's makes it really easy just to imagine each number as some sort of switch, and then you just use the switches to add up the sum on the left.

That's a good way to think of it. I just start at the first number lower than the remaining decimal number and work right from there. I don't really know of any other quick way to process it in my head.
 

CrazedNerd

Well-Known Member
Joined
Mar 31, 2021
Messages
1,151
Reaction score
526
Credits
9,926
That's a good way to think of it. I just start at the first number lower than the remaining decimal number and work right from there. I don't really know of any other quick way to process it in my head.
Ever since I've been studying computer technology (i'd say it's been over 7 years now...) i've found the idea of being able to do arithmatic in my head with accuracy more appealing, it's funny how i just hated math in school yet then seeing the actual/historical point of computers actually gave a reason to want to do math.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,580
Reaction score
7,328
Credits
69,748
i've found the idea of being able to do arithmatic in my head with accuracy more appealing

It's also faster, much of the time. It's one of the reasons I really didn't care much for early computers. I spent so much time on the input side with very little output. But, the computer was faster than I was when it got more complicated.
 

CrazedNerd

Well-Known Member
Joined
Mar 31, 2021
Messages
1,151
Reaction score
526
Credits
9,926
It's also faster, much of the time. It's one of the reasons I really didn't care much for early computers. I spent so much time on the input side with very little output. But, the computer was faster than I was when it got more complicated.
There are people who can do arithmatic with large numbers and impressive speeds, i basically look at computers as being a way to multiply the arithmatic power more than any single human possibly could. Since I've been doing the C stuff again, I have been thinking about getting some of those math books designed for elementary and middle schoolers, and then just using the pencil and paper as little as possible, but then i could learning programming lol so why? Idk, i'm still kinda open to it.
 
OP
davidd

davidd

Member
Joined
Sep 16, 2022
Messages
56
Reaction score
16
Credits
498
If you put me on a desert island and told me the only way to get out of get off the island is to do mathematics I'd perish
 

Attachments

  • dejs5a0-ac2be797-6814-431c-b5ef-98c0d96e1898.gif
    dejs5a0-ac2be797-6814-431c-b5ef-98c0d96e1898.gif
    189.4 KB · Views: 8

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,580
Reaction score
7,328
Credits
69,748
If you put me on a desert island and told me the only way to get out of get off the island is to do mathematics I'd perish

As a society, our numeracy is pretty poor. Most folks don't understand much beyond basic arithmetic.

As this thread's resolved...

I personally feel I'm qualified to opine.

I think the biggest problem is how we teach mathematics. We teach it via rote, while we should be teaching it as both a language and a philosophy. We spend too much time teaching the how, and not enough time teaching the why. In the US at least, this goes way back to some of the earliest days of mandatory schooling, where we taught kids things like the addition and multiplication tables by making them recite them until they were properly memorized.
 

CrazedNerd

Well-Known Member
Joined
Mar 31, 2021
Messages
1,151
Reaction score
526
Credits
9,926
We spend too much time teaching the how, and not enough time teaching the why
I totally agree with that perspective, yet maybe that would be an argument to start teaching in-depth mathmatics past middle school or something? I feel like with children the money analogy would be enough, but with physics, chemistry, computing...i think that would be a pretty big thing to teach the "why" behind it. I still think it's funny that i started learning algebra in middle school with the promise that it was important but i don't know ANY adults who actually use it, and logically you basically only use algebra for some sort engineering. Of course, engineering of more things than bridges...you'd certainly use algebra when constructing some sort of complicated software. It also has some sort of lab application for sure but i'm just not educated enough to really say when people use algebra in a lab ;)
 
OP
davidd

davidd

Member
Joined
Sep 16, 2022
Messages
56
Reaction score
16
Credits
498
I probably get short changed all the time the left hemisphere of my brain is a walnut. I am poor at logic.
 

CrazedNerd

Well-Known Member
Joined
Mar 31, 2021
Messages
1,151
Reaction score
526
Credits
9,926
I probably get short changed all the time the left hemisphere of my brain is a walnut. I am poor at logic.
I highly doubt any of that, you probably just suck at math like practically everyone does :p There's a lot of misunderstood neuroscience in terms of the "left and right brain".

I'm gonna make it real easy for you because it's not terribly logical on the surface. How does this test even matter, anyways? I still don't know that, but since i've studied binary before i can tell you how that particular quiz question works:

So, with binary numbers, it's always the number 2 brought to a power/exponent that increases from right to left. In other words, you read from left to right, but this goes in reverse. With each new number, you have a power of 2:

128 = 2^7 (2 to the power of 7)

64 = 2^6 (2 to the power of 6)

32 = 2^5 (2 to the power of 5)

16 = 2^4 (2 to the power of 4) ........

8 = 2^3 (2 to the power of 3) 2 times 2 times 2

4 = 2^2 (2 to the power of 2) 2 times 2

2 = 2^1 (2 to the power of 1) 2 by itself not brought to anything, "a power of 1"

1 = 2^0 (2 to the power of 0) 2 without anything applied

So it's basically just a long string of "2 x 2 x 2...", starting with 2 to the power of zero. Every time you bring a number to the power of zero, then the answer is "1" because you're not applying multiplication to the number yet, so the number just exists once in the logic of exponents. 2 to the first power just means the number alone. Any number brought to the second power means multiplying it by itself. Why binary math works that way in reference to computers is totally beyond me. Modern computers are a lot more complicated than bringing the number 2 to increased number of powers.

However, in the quiz you don't actually have do to any sort of exponentiation. I think you just click the numbers and add them with that switch the quiz provides for you. That is how computers work, there are billions/trillions of on and off circuits:

Sum

33

Answer

32 + 1

Making the numbers 1 instead of zero in the top row "turns the circuit on" in this theoretical exercise.

You can see that "all" you need to do to find the answers in the puzzle/problem is just add the top values together like a computer does until it matches the far left column. I still kinda suck at math though, so if someone can confirm or deny the validity of my logic for solving this (and also better explain binary math...), that would be neat.
 
Last edited:
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top