Skip to content

NW | 2026-mar-sdc | TzeMing Ho | Sprint 1 | number-systems-exercise#357

Open
TzeMingHo wants to merge 3 commits intoCodeYourFuture:mainfrom
TzeMingHo:coursework/number-systems
Open

NW | 2026-mar-sdc | TzeMing Ho | Sprint 1 | number-systems-exercise#357
TzeMingHo wants to merge 3 commits intoCodeYourFuture:mainfrom
TzeMingHo:coursework/number-systems

Conversation

@TzeMingHo
Copy link

@TzeMingHo TzeMingHo commented Mar 12, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

I have attempted to answer the questions.

@github-actions

This comment has been minimized.

4 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@TzeMingHo TzeMingHo changed the title NW | 2026-mar-sdc | TzeMing Ho | Sprint-1 NW | 2026-mar-sdc | TzeMing Ho | Sprint-1 | number-systems-exercise Mar 12, 2026
@TzeMingHo TzeMingHo added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module labels Mar 12, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 12, 2026
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@TzeMingHo TzeMingHo changed the title NW | 2026-mar-sdc | TzeMing Ho | Sprint-1 | number-systems-exercise NW | 2026-mar-sdc | TzeMing Ho | Sprint 1 | number-systems-exercise Mar 12, 2026
@TzeMingHo TzeMingHo added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 12, 2026

Which is larger: 00100 or 01011?
Answer:
Answer: 01011 is larger because it has more places

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's more important what the leading digit is

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I should have said the leading 1 is taking more places, and they are both 5 bits.


Convert the decimal number 14 to binary.
Answer:
Answer: 1000 + 0100 + 0010 = 1110 = 8 + 4 + 2 = 14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which method have you used here exactly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to subtract the power of 2 from 14 to get the binary numbers.
14 - 2^3 = 6
6 - 2^2 = 2
2 = 2^1


What's the largest number you can store with 4 bits, if you want to be able to represent the number 0?
Answer:
Answer: 1111

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In decimal?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

15


How many bits would you need in order to store the numbers between 0 and 255 inclusive?
Answer:
Answer: 2^8 = 256. So, we need 7 bits. b0000000 = 0, and b1111111 = 255

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how would 0 be represented?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I was 1 bit off. It should take 8 bits to store from 0 to 255.

@DaryaShirokova DaryaShirokova added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 14, 2026
@TzeMingHo TzeMingHo added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants