Skip to content

Branches - Brianna K#32

Open
brikemp wants to merge 2 commits intoAda-C12:masterfrom
brikemp:master
Open

Branches - Brianna K#32
brikemp wants to merge 2 commits intoAda-C12:masterfrom
brikemp:master

Conversation

@brikemp
Copy link

@brikemp brikemp commented Aug 30, 2019

Binary and Decimal

Congratulations! You're submitting your assignment.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nice work, you hit the essential learning goals here! Well done.

binary_array.each do |binary_value|
temp_value = (binary_value * (2 ** length))
decimal_value += temp_value
length -= 1

Choose a reason for hiding this comment

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

Clever to go backwards through the powers.

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