Skip to content

Branches - Amal - #36

Open
ashassan wants to merge 1 commit into
Ada-C12:masterfrom
ashassan:master
Open

Branches - Amal #36
ashassan wants to merge 1 commit into
Ada-C12:masterfrom
ashassan:master

Conversation

@ashassan

@ashassan ashassan commented Sep 1, 2019

Copy link
Copy Markdown

Binary and Decimal

Congratulations! You're submitting your assignment.

@CheezItMan CheezItMan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work! You hit all the requirements. Well done.

Comment thread lib/binary_to_decimal.rb
raise NotImplementedError
value = 0
8.times do |i|
value += binary_array[-(i + 1)] * (2 ** i)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clever use of negative exponents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants