Click here to Skip to main content
15,920,656 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear Friends.

As We Know that the Binary Language ( 0 and 1) is the only language that computer understands directly. But I want to know that If a computer understand binary language directly then where to apply this binary code.
Which plate form is required to run this code.

If I open a note pad and write 010001001 (for example) then does computer understand it.

Please Explain if some one can.
Posted
Updated 11-Apr-20 17:42pm

Rather than add to the previous comments I would merely suggest you take a look at some of the Intel Documents[^] which explain their architecture (the platform that Windows generally runs on).
 
Share this answer
 
Have a read of Andrew Tanenbaum's "Structured Computer Organisation." I'd recommend 3rd or later edition if you buy one second hand. Tanenbaum takes the reader from a description of digital circuits (where high and low potential differences represent binary 0s and 1s) and builds on it until he reaches operating systems. Along the way he answers all the questions you've got here AND gives you a pretty good understanding of how computers work.

Cheers,

Ash
 
Share this answer
 
v3
rashidfarooq wrote: "When there was no language except binary language then the scientists / programmers used which plate form to command the computer using binary language."

Punched cards[^] was one way to do it. Manually setting electrical switches another.

rashidfarooq wrote: "And is that plate form exists today?"

This can probably be a subject for a course in electro mechanics or the like, but not for any commercial use.
 
Share this answer
 
As Christian said, you are totally confused about the "magic" of 0's and 1's. A computer doesn't "understand" any language, it merely executes operations that are given to it. These operations are in fact bytes (or greater) that corresponds to a code plus arguments (also bytes) depending on the operation. You can write these codes in binary if you want, but then you'll need a binary editor (an editor that only accepts 0's and 1's and store 8 of these digits in one byte). I never heard about a binary editor.
So, if you try to write your binary code in notepad, each digit will be converted to a full byte depending on its character encoding: a zero has an ASCII code of 48 and a one has an ASCII code of 49 (see here[^]). So, if you write a sequence like this in notepad:
0 0 1 1, it will be converted in binary to:
110000 110000 110001 110001 (48 and 49 converted to binary). So, you see that it is totally different than what you expected.
What you could do is put 8 bits together and look into the ASCII table for the corresponding symbol and write this one instead. Or you could use an hexadecimal editor.

However, even if you succeed to write your binary file like that, you will never be able to execute it because it will not be recognized by Windows as a valid executable (it doesn't have the correct header for isntance).

So, to summarize, it is impossible to write in binary (it was something you could do when the first computer was invented but it is not possible anymore now). As Christian said, if you really want to go to the lowest possible level, you have to write in assembler. But if you understand what assembler is, you'll soon realize that it is close to "binary".
 
Share this answer
 
The core issue is that you over heard something and you don't understand it at all. If you type a 1 in to notepad, it's stored as a byte ( 8 bits ) in a text file. You can't write code in 1s and 0s, the best you could do is write assembler, which is ultimately what applications get compiled to, somewhere. I suggest you forget this line of questioning, none of the answers will make sense to you, or help you in any way. No-one writes assembler code if they can help it, and no programmer types 1s and 0s all day long.
 
Share this answer
 
Comments
rashidfarooq 4-Aug-10 1:57am    
Dear Brother.
Thanks for answering.
I am not going to write an assembler But I want to understand this concept that computer understands the binary language directly. When there was no language except binary language then the scientists / programmers used which plate form to command the computer using binary language.
And is that plate form exists today?
You very well can. However you must understand the basics.

When you type 1's and 0's in a notepad, they are written and saved as characters i.e. 8 bits (assume ASCII) which itself contains a series of 1's and 0's that are used to represent the characters "1" and "0".

The real binaries are a different ball game. First, they are not only dependent on the underlying processor but also on the OS that they are supposed to run on. And thats the reason a Windows executable isn't runnable on Linux and vice versa even if both OS are running on the exact same processor.

Then, it depends on how you present the binaries to the OS. Every OS has its own format which it considers executable. For Windows, its the PE format. Read about it, understand and learn that format. But what are you going to program? You can't write C there! You got to write in low level code. So, you got to learn assembler for the target processor. Then you must become familiar with the byte encoding of the assembler mnemonics, which, believe me, isn't pretty at all. Then, after all these, get hold of a hex editor. A hex editor allows you you type binary '1' instead of ASCII '1'. Now you are ready to create an executable "by hand" and don't forget to save the file with the expected extension, which is ".exe" for Windows.

If at all you are going to attempt this, before any fancy stuff, get that executable to work, as in, write a "program" that is empty and does nothing. And this itself will be really tiresome to accomplish!

Its fun no doubt and helps you understand a lot about what exactly makes things run but this is not recommended for office work!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900