Would a code written in binary compile? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Would a code written in binary compile?

Say I write a piece of code.And then I convert it to 1s and 0s, and then send it to the compiler. Would it compile? Would it run correctly?

4th Nov 2018, 5:31 PM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
3 Answers
+ 1
You don’t compile binary, it gets directly interpreted by the processor.
4th Nov 2018, 5:50 PM
TurtleShell
TurtleShell - avatar
+ 1
Hey there, First of all - the idea of compiling is to take a code written in english (human language) and turn it into binary (1s and 0s, computer's language). So as someone already said - there is no need to compile those 1s and 0s. Moreover - normal programming (c, java etc.) may be hard for some people, but assembly language (the closest english language to binary) is WAY harder. I'm not here to frighten you, it's accually really cool that you're trying to learn machine language, but you should take it step by step - learn assembly first (youtube can help a lot), and after that it would be easier for you to understand those 1s and 0s. I have tried myself to learn assembly ones, gave up pretty soon, so I never even checked if there is an option to write directly in binary language, but I suggest you to start from assembly and then move to binary (and youtube might help a lot :) )
5th Nov 2018, 1:26 AM
Yoni Simian
0
Technically, text files already are 0s and 1s, some programs are just able to show what those 0s and 1s means
4th Nov 2018, 6:42 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar