Talk:Binary digits: Difference between revisions

Does this make sense to you?
(I thought this was straightforward.)
(Does this make sense to you?)
Line 38:
 
: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 decimal. In many languages, this is deserialized to a number which 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)
6,951

edits