HP3000-L Archives

December 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Fri, 1 Dec 2000 14:00:22 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (14 lines)
Allen asks:

> Now how do I do
>  this in reverse?  If I know the sum is 81, how do I determine that the
>  numbers that make up this sum are 1 + 16 + 64?

Simply begin with the largest power of two smaller than 81 (in this case, 64)
and subtract it out. Then repeat the process, subtracting the largest power
of two from whatever remains. And then repeat again, until nothing is left.

This general process works for converting any number base to any number base.

Wirt Atmar

ATOM RSS1 RSS2