Re: Showing number as binary

2020-02-19 Thread Johnny Rosenberg
Den ons 19 feb. 2020 kl 22:18 skrev Brian Barker
:

> At 21:08 19/02/2020 +0100, Johnny Rosenberg wrote:
> >Here's one way. I don't have Apache OpenOffice so I can't test it,
> >but I tested it with LibreOffice and I think it would work in Apache
> >OpenOffice too:
> >=VALUE(BASE(42;2))
> >Now format the cell like the following:
> >[...]
> >" "
> >
> >Note that if omitting the quotes, typing   in that field
> >will fail, (the cell will display 00 101 010). I'm not sure why
> >though. As I said, I tested this in LibreOffice, hopefully it will
> >work in Apache OpenOffice too.
>
> For what it's worth, the version without quotes works too in my OpenOffice.
>
> At 21:16 19/02/2020 +0100, Johnny Rosenberg wrote:
> >After some more experimenting I found this way, ...
> >And the cell formula looks like this:
> >=TEXT(VALUE(BASE(42;2));""" """)
>
> Again,
> =TEXT(VALUE(BASE(42;2));" ")
> works in my OpenOffice.
>
>
Ok, seems to be a bug (or feature…) in LibreOffice then.

I just saw that Apache OpenOffice is available in AUR (Arch User
Repository), so I'm installing it right now, so I don't have to guess in
the future… 😁


Kind regards

Johnny Rosenberg


> Brian Barker
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: users-h...@openoffice.apache.org
>
>


Re: Showing number as binary

2020-02-19 Thread Brian Barker

At 21:08 19/02/2020 +0100, Johnny Rosenberg wrote:
Here's one way. I don't have Apache OpenOffice so I can't test it, 
but I tested it with LibreOffice and I think it would work in Apache 
OpenOffice too:

=VALUE(BASE(42;2))
Now format the cell like the following:
[...]
" "

Note that if omitting the quotes, typing   in that field 
will fail, (the cell will display 00 101 010). I'm not sure why 
though. As I said, I tested this in LibreOffice, hopefully it will 
work in Apache OpenOffice too.


For what it's worth, the version without quotes works too in my OpenOffice.

At 21:16 19/02/2020 +0100, Johnny Rosenberg wrote:

After some more experimenting I found this way, ...
And the cell formula looks like this:
=TEXT(VALUE(BASE(42;2));""" """)


Again,
=TEXT(VALUE(BASE(42;2));" ")
works in my OpenOffice.

Brian Barker  



-
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org



Re: Showing number as binary

2020-02-19 Thread Andrew Pitonyak

Can I just say that this is for certain the best solution I have seen to 
accomplish this. Did not know that you could do that. 

On Wednesday, February 19, 2020 15:16 EST, Johnny Rosenberg 
 wrote:
 Den ons 19 feb. 2020 kl 21:08 skrev Johnny Rosenberg :

> Den ons 19 feb. 2020 kl 10:09 skrev Andrea Vt :
>
>> Hi all :-)
>>
>> Is there a way to show a number as binary with a separation?
>>
> Yes, there seems to be.
>
>>
>> E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)
>>
>> Thanks and have a nice day
>>
> Have a nice day you too.
>
>
> And maybe I should answer the question I think you meant to ask too: ”How?”
>
> Here's one way. I don't have Apache OpenOffice so I can't test it, but I
> tested it with LibreOffice and I think it would work in Apache OpenOffice
> too:
> =VALUE(BASE(42;2))
> Now format the cell like the following:
> Right click the cell → click Format cells…
> Select the Number tab.
> In the field ”Format description”, enter the following:
> " "
> Hit OK.
>
> Note that if omitting the quotes, typing   in that field will
> fail, (the cell will display 00 101 010). I'm not sure why though.
> As I said, I tested this in LibreOffice, hopefully it will work in Apache
> OpenOffice too.
>
>
> Kind regards
>
> Johnny Rosenberg
>

After some more experimenting I found this way, that differs from the other
method in the following ways:

- No need for using cell formatting
- The cell content is a string rather than a number

And the cell formula looks like this:
=TEXT(VALUE(BASE(42;2));""" """)

Of course you should replace ”42” with a cell reference or a formula in
most cases, like this:
=TEXT(VALUE(BASE(A1;2));""" """)

Sorry for stating the obvious… 😁


Kind regards

Johnny Rosenberg

>
>
>
>
>> Andrea
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
>> For additional commands, e-mail: users-h...@openoffice.apache.org
>>
>>


 


Re: Showing number as binary

2020-02-19 Thread Johnny Rosenberg
Den ons 19 feb. 2020 kl 21:08 skrev Johnny Rosenberg :

> Den ons 19 feb. 2020 kl 10:09 skrev Andrea Vt :
>
>> Hi all :-)
>>
>> Is there a way to show a number as binary with a separation?
>>
> Yes, there seems to be.
>
>>
>> E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)
>>
>> Thanks and have a nice day
>>
> Have a nice day you too.
>
>
> And maybe I should answer the question I think you meant to ask too: ”How?”
>
> Here's one way. I don't have Apache OpenOffice so I can't test it, but I
> tested it with LibreOffice and I think it would work in Apache OpenOffice
> too:
> =VALUE(BASE(42;2))
> Now format the cell like the following:
> Right click the cell → click Format cells…
> Select the Number tab.
> In the field ”Format description”, enter the following:
> " "
> Hit OK.
>
> Note that if omitting the quotes, typing   in that field will
> fail, (the cell will display 00 101 010). I'm not sure why though.
> As I said, I tested this in LibreOffice, hopefully it will work in Apache
> OpenOffice too.
>
>
> Kind regards
>
> Johnny Rosenberg
>

After some more experimenting I found this way, that differs from the other
method in the following ways:

   - No need for using cell formatting
   - The cell content is a string rather than a number

And the cell formula looks like this:
=TEXT(VALUE(BASE(42;2));""" """)

Of course you should replace ”42” with a cell reference or a formula in
most cases, like this:
=TEXT(VALUE(BASE(A1;2));""" """)

Sorry for stating the obvious… 😁


Kind regards

Johnny Rosenberg

>
>
>
>
>> Andrea
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
>> For additional commands, e-mail: users-h...@openoffice.apache.org
>>
>>


Re: Showing number as binary

2020-02-19 Thread Johnny Rosenberg
Den ons 19 feb. 2020 kl 10:09 skrev Andrea Vt :

> Hi all :-)
>
> Is there a way to show a number as binary with a separation?
>
Yes, there seems to be.

>
> E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)
>
> Thanks and have a nice day
>
Have a nice day you too.


And maybe I should answer the question I think you meant to ask too: ”How?”

Here's one way. I don't have Apache OpenOffice so I can't test it, but I
tested it with LibreOffice and I think it would work in Apache OpenOffice
too:
=VALUE(BASE(42;2))
Now format the cell like the following:
Right click the cell → click Format cells…
Select the Number tab.
In the field ”Format description”, enter the following:
" "
Hit OK.

Note that if omitting the quotes, typing   in that field will fail,
(the cell will display 00 101 010). I'm not sure why though.
As I said, I tested this in LibreOffice, hopefully it will work in Apache
OpenOffice too.


Kind regards

Johnny Rosenberg




> Andrea
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: users-h...@openoffice.apache.org
>
>


Re: Showing number as binary

2020-02-19 Thread Brian Barker

At 10:09 19/02/2020 +0100, Andrea Vt wrote:

Is there a way to show a number as binary with a separation?
E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)


You do mean the binary equivalent of 42 but split into two groups - 
not the separate binary equivalents of the digits 4 and 2 - right?


Try:
=LEFT(BASE(A1;2;8);4)&" "&RIGHT(BASE(A1;2;8);4)

I trust this helps.

Brian Barker


-
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org



Re: Showing number as binary

2020-02-19 Thread Andrew Pitonyak
I wrote a macro to convert to / from binary. You cannot specify the base or the 
number of digits.

I don't remember if it is published in OOME or AndrewMacro, but but are on my 
web site for download.

⁣Sent from BlueMail ​

On Feb 19, 2020, 4:09 AM, at 4:09 AM, Andrea Vt  wrote:
>Hi all :-)
>
>Is there a way to show a number as binary with a separation?
>
>E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)
>
>Thanks and have a nice day
>
>Andrea
>
>
>-
>To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
>For additional commands, e-mail: users-h...@openoffice.apache.org


Showing number as binary

2020-02-19 Thread Andrea Vt

Hi all :-)

Is there a way to show a number as binary with a separation?

E.g. 42 as 0010 1010. (BASE(42;2;8) -> 00101010)

Thanks and have a nice day

Andrea


-
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org