how to write number one in binary?

Thread Starter

Werapon Pat

Joined Jan 14, 2018
35
today I learnt about how to convert decimal to binary ,but there's one thing that teacher told me and I really wonder if that's true?
he said, when we write number one in binary format we do not write its head for instance, this is "1" in decimal, but this is "l" (number one) in binary.
I tried to find the information about this and I could not find one. So I wonder is this true?
 

dl324

Joined Mar 30, 2015
18,220
he said, when we write number one in binary format we do not write its head for instance, this is "1" in decimal, but this is "l" (number one) in binary.
I'm going to call BS on this.

Binary format in a computer is a 1 or 0. When it's written, it doesn't matter how the number 1 is rendered.

Back in the days of manual typewriters, it wasn't uncommon for them not to have a key for the numeral one. That didn't mean they couldn't type decimal or binary numbers that contained 1; we just used the lowercase letter ell which was interpreted to be a 1.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
Probably something to do with the common practice of using | for on and 0 for off on machine control PB etc.
Now the International symbol.

Max.
 

Attachments

Last edited:

Hymie

Joined Mar 30, 2018
1,347
Probably something to do with the common practice of using | for on and 0 for off on machine control PB etc.
Now the International symbol.

Max.
This symbol (IEC 60417-5009) does not represent On/Off – but is the ‘Stand-by’ symbol.

Where this symbol is used on equipment, it indicates that there is no disconnection of the power to the device – just that the equipment is in stand-by mode (commonly seen of laptops, desktop PCs and such like).
 

WBahn

Joined Mar 31, 2012
32,704
today I learnt about how to convert decimal to binary ,but there's one thing that teacher told me and I really wonder if that's true?
he said, when we write number one in binary format we do not write its head for instance, this is "1" in decimal, but this is "l" (number one) in binary.
I tried to find the information about this and I could not find one. So I wonder is this true?
I would suspect that the reason for this is to distinguish between values written in binary and values written in decimal. If the teacher believes that this is how everyone does it, it's probably just how he was taught by someone that chose to do it that way.

When the base in use is not clear from context, it needs to be made explicit. The traditional way, in mathematical contexts, is to follow the number with a subscript that indicates the number base (and that subscript is almost universally written in decimal). In text, that isn't an option, so a number of common (and even more not-so-common) ways have evolved. For bases that are supported by common programming languages, the syntax of that language is used if the discussion is related to that language. For hexadecimal, the C syntax is very widely used (0x123 indicates base-16) even in contexts unrelated to C; another common convention is to use 'H' (or 'h') as either a prefix or suffix. For binary, a 'B' (or 'b') is a common prefix/suffix. For arbitrary number bases, the two most common conventions I have seen are a suffix using an underscore followed by the number base or a suffix using curly braces around the number base and usually an underscore to connect them.

When all else fails, write "(in binary)" near the number.
 

MrChips

Joined Oct 2, 2009
34,628
How do we know what 1101 means when working with exercises in computer arithmetic?

Another way to avoid ambiguity is to write the radix (base) in a smaller font as subscript at the end.

Here are examples:

base-2 - 11012
base-8 -11018
base-10 - 110110
base-16 -110116
 

jpanhalt

Joined Jan 18, 2008
11,087
How do we know what 1101 means when working with exercises in computer arithmetic?

Another way to avoid ambiguity is to write the radix (base) in a smaller font as subscript at the end.

Here are examples:

base-2 - 11012
base-8 -11018
base-10 - 110110
base-16 -110116
True, but n^0 =1 regardless of the base one is using. Now, whether there is a "2" ... "F" (for example) does depend on the base.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
This symbol (IEC 60417-5009) does not represent On/Off – but is the ‘Stand-by’ symbol.
Many other references:
IEC 60417-5008, the power-off symbol (circle) on a button or toggle, indicates that using the control will disconnect power to the device. ... IEC 60417-5010, the power on-off symbol (line within a circle), is used on buttons that switch a device between on and fully off states.
I was not refering to the E_stop symbol or P.B. which is a red P.B. on a yellow backgropund!
Max.
 

crutschow

Joined Mar 14, 2008
38,322
he said, when we write number one in binary format we do not write its head for instance, this is "1" in decimal, but this is "l" (number one) in binary.
I believe he's making a false, or at least an unnecessary, distinction.
I agree with jpanhalt
"1" is "one" in any radix, whether the base is binary, octal, decimal, hexadecimal, sexagesimal, or whatever.
 

MrChips

Joined Oct 2, 2009
34,628
I think the TS is using poor semantics.

The number 1 has numerical value one in any radix (in conventionally established number systems).

I think what the TS meant is what symbol or icon does one use to indicate a numeral 1 when being used in binary notation, for example 11012
 

jpanhalt

Joined Jan 18, 2008
11,087
I think the TS is using poor semantics.

The number 1 has numerical value one in any radix.
I think what the TS meant is what symbol or icon does one use to indicate a numeral 1 when being used in binary notation, for example 11012
Then does this question resolve whether one should use serif or non-serif fonts for binary but not for decimal?

As I said, I smell something. TS needs to get back to the teacher and ask, "why."
 

MrChips

Joined Oct 2, 2009
34,628
Like, when I was first introduced to programming we were told to put a dot in the middle of 0 to represent zero and not "O".

Then I discovered some systems were using it to mean exactly the opposite!:eek:

When I visit the UK I find all the light switches are upside down!:rolleyes:

You can't keep everybody happy.
 

MrChips

Joined Oct 2, 2009
34,628
I always used one other method for the zero and "O" distinction.

Max..
And then you have to remember which one it is supposed to represent.

Reference:
https://en.wikipedia.org/wiki/Slashed_zero

Slashed 'O'[edit]

IBM (and a few other early mainframe makers) used a convention in which the letter O had a slash and the digit 0 did not.[8] This is even more problematic for Danes, Faroese, and Norwegians because it means two of their letters—the O and slashed O (Ø)—are visually similar.

This was later flipped and most mainframe chain or band printers used the opposite convention (letter O printed as is, and digit zero printed with a slash Ø). This was the de facto standard from 70's to 90's. However current use of network laser printers that use PC style fonts caused the demise of the slashed zero in most companies - only a few configured laser printers to use Ø.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
I have also always been used to writing the slashed 7, . A short horizontal bar used to cross the vertical in the middle to distinguish the seven from a numeral one, it is prevalent in Europe and Canada, not so much in the USA.
Particularly common in France where the one is often written with a very long upstroke first.
Max.

upload_2018-9-4_22-44-13.png
 

WBahn

Joined Mar 31, 2012
32,704
I have also always been used to writing the slashed 7, . A short horizontal bar used to cross the vertical in the middle to distinguish the seven from a numeral one, it is prevalent in Europe and Canada, not so much in the USA.
Particularly common in France where the one is often written with a very long upstroke first.
Max.
I find that long upstroke particularly annoying (merely because I'm not used to it -- I'm sure they find our short tick (or no tick) -- equally annoying). It always looks like a tall, skinny carat symbol, '^', or a logical disjunction symbol, '∧', at first and I have to expressly remind myself that it must be a '1'.
 
Top