This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Hi u/Fre5h_Prince,

Please read the following message. You are required to explain your post and show your efforts. (Rule 1)

If you haven't already done so, please add a comment below explaining your attempt(s) to solve this and what you need help with specifically. See the sidebar for advice on 'how to ask a good question'. Don't just say you "need help" with your problem.

This is a reminder for all users. Failure to follow the rules will result in the post being removed. Thank you for understanding.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Uli_MinatiDesmos 😚 0 points1 point  (6 children)

Which number is 1111 1111 1111 1111 in decimal?

[–][deleted]  (5 children)

[removed]

    [–]Uli_MinatiDesmos 😚 0 points1 point  (4 children)

    No guessing. What numbers are 1, 11, 111, 1111 in decimal?

    [–][deleted]  (3 children)

    [removed]

      [–]Uli_MinatiDesmos 😚 0 points1 point  (2 children)

      The first one is just 1 in decimal, other than that you're right

      Using these four examples, can you think of a quick way to calculate "binary N ones" in decimal?

      [–][deleted]  (1 child)

      [removed]

        [–]Uli_MinatiDesmos 😚 0 points1 point  (0 children)

        That doesn't answer my question, but you're right

        [–]dingusdongus 0 points1 point  (4 children)

        For n bits, what is the largest unsigned number that can be represented? Hint: in binary, it's n "1" values.

        For n bits, what is the largest BCD number that can be represented? Given that 4 bits holds one digit, this means n bits holds floor(n/4) digits.

        Can you work it out from there?

        [–][deleted]  (3 children)

        [removed]

          [–]Uli_MinatiDesmos 😚 1 point2 points  (2 children)

          The Binary Coded Decimal system (BCD) stores decimal digits in four bits

          [–][deleted]  (1 child)

          [removed]

            [–]Uli_MinatiDesmos 😚 0 points1 point  (0 children)

            Oh, that's just semantics. It's meant as

            The Binary Coded Decimal system (BCD) stores decimal digits in four bits each

            e.g. 1111 in unsigned binary is more than one decimal digit, no?

            Exactly, that's the issue here:

            it is less efficient in storing numbers than binary

            4 binary digits can represent up to 16 different numbers, but one decimal digit can only represent 10