Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Would there ever be a reason to write code in pure binary?

Is there ever a situation when ASM just isn't low-level enough? After all, assembler still has to be assembled. Has anyone ever written a program in binary? I'm just wondering if there's ever a theoretical reason why doing so might be practical or even if it's possible on modern computers.

like image 585
jamieb Avatar asked Feb 19 '10 21:02

jamieb


People also ask

Does anyone write code in binary?

True, people almost never actually write binary. Instead, they code in a high- or low-level language which is closer to a natural language and easier to reason about. But by the time their program has been rendered down to something a piece of hardware can understand, there's nothing left but binary.

Is there any reason to learn binary?

Binary codes are essential because without them, computers will not understand your instructions in programming. Meaning, even if the computer allows you to view text, images, or videos, they cannot understand any of these, and the only way for them to do it is through binary codes.

Why binary language is not popularly used by programmers?

Uses of Binary Language Computers understand machine language, but to write strings upon strings of 1s and 0s code is tedious and time consuming. Programmers write instructions to a computer in high level languages such as Python, FORTRAN and Java. These instructions are user friendly but cannot be read by computers.

What is the point of binary code?

A binary code represents text, computer processor instructions, or any other data using a two-symbol system. The two-symbol system used is often "0" and "1" from the binary number system. The binary code assigns a pattern of binary digits, also known as bits, to each character, instruction, etc.


1 Answers

Back in 1997 I used to do this on TI-83 calculators when I was at school and didn't have access to a link cable.

Normally at that time, you would just write an assembly program, use TASM to build it, and then transfer it to the calculator via a link cable. But if I was bored and wanted to put something small together, I had memorized enough of the byte instructions to be able to type them in for certain things.

Side Note Of course this was fun if there was a bug in the program, because it could easily corrupt the entire calculator's RAM. So then you would have to hold down the ON button and/or remove the AAA batteries and hope that was enough to restore the calc (sans any programs that were in memory). Otherwise to do a hard reset, you would have to use a screwdriver to unscrew a special backup battery. Good times...

like image 88
Justin Ethier Avatar answered Sep 20 '22 07:09

Justin Ethier