Skip to main content
1-Visitor
April 15, 2013
Solved

Decimal to Binary Representation

  • April 15, 2013
  • 1 reply
  • 9517 views

Hiya,

I have searched all of the functions in mathcad 15 but there is no function defined which could

convert a decimal to binary numbers. Kindly can anyone provide some guidance about the

subjected problem.

Regards and Thanks.

Best answer by AndyWesterman

if you need to manipulate the bits of a nember then it becomes a little more difficult,

You will need the start writing subroutines to change the way that mathcad store the data.

Attached are 2 examples that you can use to create binary vectors from a decimal number and convert back again.

The built in logic elements can be used, but you may have to force the size of the vector to match to clear one possible error.

Regards

Andy

1 reply

12-Amethyst
April 15, 2013

Hi,

select the result to display in binary,

Capture.PNG

then the menu "format", "result"

You should get a pop-up menu like this

Capture.PNG

Select the "Display Options" tab

Capture.PNG

And change the radix from decimal to binary, options for octal & hexadecimal also exist.

Regards

Andy

1-Visitor
April 16, 2013

Hi,

Thanks for your reply, but this technique only display the decimal number to binary.

I want to use the decimal number in binary form for further computations.

Regards.

12-Amethyst
April 16, 2013

if you need to manipulate the bits of a nember then it becomes a little more difficult,

You will need the start writing subroutines to change the way that mathcad store the data.

Attached are 2 examples that you can use to create binary vectors from a decimal number and convert back again.

The built in logic elements can be used, but you may have to force the size of the vector to match to clear one possible error.

Regards

Andy