cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Decimal to Binary Representation

ptc-5051640
1-Visitor

Decimal to Binary Representation

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.

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6

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

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.

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

Thanks alot, I also found one way, below is the image.

dec2bin.jpg

Regards.

Try Mathcad on-line calculation please

http://twt.mpei.ac.ru/MCS/Worksheets/base2base.xmcd

Werner_E
25-Diamond I
(To:ptc-5051640)

You may be interested in this thread: http://communities.ptc.com/message/192232#192232

Announcements

Top Tags