Talk:Binary digits: Difference between revisions

binary means the base two numbering system
(binary means the base two numbering system)
Line 39:
:I used the term "decimal integer", which I thought was straightforward. The intention was to provide a function or procedure that takes a decimal integer and outputs the binary digits. For example: print tobinary(5) gives output 101, where 5 is a decimal value, and the output would be 101 in binary digits. The word "decimal" here is to indicate that the input value is in base 10. I don't know why "digits" is causing confusion. The word "conversion" does not appear in the task description. [[User:Markhobley|Markhobley]] 19:04, 8 July 2011 (UTC)
::There are three distinct entities here. The input text is "5", and is a decimal representation of a number. In many languages, this is deserialized to an internal representation of a number (and this internal representation is binary). The result of tobinary() would then take this binary number and produces output text which is "101". There are some exceptions to this overview (snobol4, bash and m4 might all be exceptions). But, in the typical case tobinary() takes a binary number argument and produces a textual result (and in the exceptional cases it is still producing a textual result). --[[User:Rdm|Rdm]] 20:38, 8 July 2011 (UTC)
:::Ah right. I would tend to refer to the argument as numerical, rather than binary in this case. By binary, I mean the base two numbering system. The argument is not really binary, if it is not in base two. (I am talking at input level, not cpu level here.) [[User:Markhobley|Markhobley]] 21:20, 8 July 2011 (UTC)