Bader N.

asked • 04/25/16

1.Write an Algorithm , Flow chart , pseudo code to convert from decimal number system(base-10) to binary number system(base-2).

1.Write an Algorithm , Flow chart , pseudo code to convert from decimal number system(base-10) to binary number system(base-2).
 
 

Bader N.

soryy ,, but I want the answer in the (algorithm steps )like this ...
step1: start
step2: 
but I don't know how to write it to the end
please help me 
Report

04/25/16

2 Answers By Expert Tutors

By:

David W. answered • 04/25/16

Tutor
4.7 (90)

Experienced Prof

Bader N.

soryy ,, but I want the answer in the (algorithm steps )like this ...
step1: start
step2:
but I don't know how to write it to the end
please help me
Report

04/25/16

David W.

Algorithm to Convert From Decimal To Another Base 

Step 1:  Let n be the decimal number.

Step 2:  Let b be the number, initially 0, that becomes our answer.  We'll be composing it right to left.

Step 3:  Repeat until n becomes 0
     Step 3a:   Divide n by 2, letting the result be d and the remainder be r.
     Step 3b:   Append the remainder, r, as the leftmost digit of b.
     Step 3c:   Let d be the new value of n.
 
Note:  You must trace this with some sample values.  I may have left a type in the algorithm.
Report

04/25/16

Arnold F. answered • 04/25/16

Tutor
5 (53)

College Professor & Expert Tutor In Statistics and Calculus

Bader N.

soryy ,, but I want the answer in the (algorithm steps )like this ...
step1: start
step2:
but I don't know how to write it to the end
please help me
Report

04/25/16

Arnold F.

Are you looking for a computer program? See David's answer.
 
Are you looking for a pseudo code program? (Ala a generic discrete math course?)
 
Are you just looking for an algorithm? (Ala steps explained in English?)
 
 
Report

04/25/16

Bader N.

i want the answer in algorithm like steps 
Report

04/25/16

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.