In a calculated question, how do I display a signed binary number response?

In a calculated question, how do I display a signed binary number response?

by Patrick SIBILLE -
Number of replies: 0

Hello,

In a calculated question, when converting from any base to base 2, is it possible to add a zero to the left of the result (high weight) in order to obtain a signed binary number?

Didactic example : 

conversion from (3)10 to binary is written by default : (11)2, in the context of a signed number, I would like this result to be displayed with a zero to the left, in the form : (011)2. I would like to be able to display the answer as (with the right syntax): {0 decbin({N})}.

In advance, I thank you for your answers and wish you all a pleasant day.

Yours sincerely,

Patrick


Average of ratings: -