- #1
Steven Ellet
- 85
- 3
If I have program X how do I get it in binary form?
Your question is very vague.Steven Ellet said:If I have program X how do I get it in binary form?
Based on you response, it seems I have much to learn. When I say "Program" I mean quite a few things from executable to text documents to chrome, etc - but to start with, something simple. You say an executable is already in binary and yet it is a exe file, I am looking for the 01100 format. i am hoping for a program that can convert for mePlease provide additional information
Text documents are just that - text that is readable by humans. They are not binary files.Steven Ellet said:Based on you response, it seems I have much to learn. When I say "Program" I mean quite a few things from executable to text documents to chrome, etc
An exe file is in binary form. The exe2bin tool that rcgldr referred to existed back in the days of DOS. That tool was used to convert an exe file to a different format (but still binary) -- for the exe2bin that I'm referring to, see http://en.wikipedia.org/wiki/Exe2bin.Steven Ellet said:- but to start with, something simple. You say an executable is already in binary and yet it is a exe file
Convert what to binary form? There's no point in converting a text file to binary, and executables already are in binary form. Your question is still unclear.Steven Ellet said:, I am looking for the 01100 format. i am hoping for a program that can convert for me
Thank you, I had almost given up hope of being understood. This seems to be what I was looking for, even if it is not a program. https://www.physicsforums.com/members/mark44.147785/-you did not understand my request, as Tosh5457 stated "Anything in a computer is in binary code, text or otherwise." hence "01100 format" Now that an understanding has been made, is there a program that will shortcut this process?Tosh5457 said:Anything in a computer is in binary code, text or otherwise. The difference between a simple text file and executables/libraries/drivers is that the binary/hex code of the text file is limited to ASCII codes (http://www.asciitable.com/), whereas executable files may have any hex codes. Download an Hex Editor, it'll show you the hex codes of any file, which you can then translate to binary using this tool for example: http://www.binaryhexconverter.com/hex-to-binary-converter
DrZoidberg said:Under linux you just open a console and type "xxd - b filename > output.txt".
jtbell-iMac:Desktop jtbell$ cat testfile
One two three
Four five six
jtbell-iMac:Desktop jtbell$ xxd -b testfile
0000000: 01001111 01101110 01100101 00100000 01110100 01110111 One tw
0000006: 01101111 00100000 01110100 01101000 01110010 01100101 o thre
000000c: 01100101 00001010 01000110 01101111 01110101 01110010 e.Four
0000012: 00100000 01100110 01101001 01110110 01100101 00100000 five
0000018: 01110011 01101001 01111000 00001010 six.
Yes, all things in a digital computer are in binary form, but at first you were calling everything "programs" and that is what confused people. I think Mark understood your original post as well as it possibly COULD be understood since you clearly did not understand that text files, as you now know, are not programs.Steven Ellet said:Thank you, I had almost given up hope of being understood. This seems to be what I was looking for, even if it is not a program. https://www.physicsforums.com/members/mark44.147785/-you did not understand my request, as Tosh5457 stated "Anything in a computer is in binary code, text or otherwise." hence "01100 format" Now that an understanding has been made, is there a program that will shortcut this process?
What is your actual goal here? I mean, hex IS binary, just condensed but trivial to read as binary, so what is it that a binary output will give you that a hex output won't?Steven Ellet said:The Hex Editor program (HxD) I downloaded works great but does half the work I need-the output is in hex. No program or website seem able to handle the code properly, http://www.binaryhexconverter.com/hex-to-binary-converter has a max of max. 7blackblackfff and just results in an error. One example of what won't work has code that is (Hex) 00000000 through 0000F380 and 00 through 0F
Might as well get all the goodies by getting https://www.cygwin.com/jtbell said:This guy appears to have ported Unix/Linux xxd (which I demonstrated above) to Windows:
http://www.weihenstephan.de/~syring/win32/UnxUtilsDist.html
Maybe it was changed, but the wikipedia article for exe2bin now refers to the version that "existed back in the days of DOS". As mentioned in the wiki article, one usage for exe2bin was to create a .COM image file, and another usage was to create a binary file to be used in a BIOS or device driver. Variations of exe2bin were made to create images for embedded systems, although I'm not sure how this differs much from creating an image to be used in a BIOS. One aspect of this is that initialized data is stored somewhere in the image, and at startup, that data is moved from the stored location in the image to it's targeted location somewhere in read/write memory.Mark44 said:The exe2bin tool that rcgldr referred to existed back in the days of DOS. That tool was used to convert an exe file to a different format (but still binary) -- for the exe2bin that I'm referring to, see http://en.wikipedia.org/wiki/Exe2bin.
phinds said:What is your actual goal here? I mean, hex IS binary, just condensed but trivial to read as binary, so what is it that a binary output will give you that a hex output won't?
I'm with @phinds and @DrZoidberg here. @Steven Ellet, just what are you looking to do? It's a simple matter to convert from hex to binary (i.e., base-2). Just convert each hex digit to its equivalent four binary digits.DrZoidberg said:Could you be more specific? What exactly is that "code" that you want to convert to binary? What exactly is the binary output supposed to look like? And what do you want to use that binary code for?
My friend is trying to create a new form of programing that he thinks will be faster than what currently exists. I do not know what he requires for this but I want to help him by giving him all he might need. The reason I wanted a program instead of a website is so he can work offline as needed. For all I know he might start from the ground up (which I think would be rather hard).phinds said:What is your actual goal here? I mean, hex IS binary, just condensed but trivial to read as binary, so what is it that a binary output will give you that a hex output won't?
Which STILL gives me no idea whatsoever why you need a binary view of anything.Steven Ellet said:My friend is trying to create a new form of programing that he thinks will be faster than what currently exists. I do not know what he requires for this but I want to help him by giving him all he might need. The reason I wanted a program instead of a website is so he can work offline as needed. For all I know he might start from the ground up (which I think would be rather hard).
My friend understands programing better than I do, so he might need something totally unrelated to binary and hex. I am just making a stab at what he might need. and like I said, he might be starting from scratch. if anyone has any ideas that would help make a new form of programing, please post. (Absolutely NO naysayers or tearing down the idea)phinds said:Which STILL gives me no idea whatsoever why you need a binary view of anything.
EDIT: and by the way, if your friend can't even write his own program to output binary from any file, the thought that he is going to "create a new form of programing that he thinks will be faster than what currently exists" is hilarious.
The purpose of converting a program to binary is to make it readable and executable by a computer. Binary code is the most basic form of instructions that a computer can understand and execute.
Binary code is a coding system that uses only two digits, 0 and 1, to represent data and instructions. It works by breaking down instructions into a series of 0s and 1s, which the computer can then interpret and execute.
To convert a program to binary, you can use a compiler or an assembler. These tools take the source code of a program and convert it into machine code, which is in binary form, making it executable by the computer.
The main advantage of using binary code is that it is the most fundamental and reliable form of coding for computers. It allows for more efficient storage and processing of data, making programs run faster and more efficiently.
One downside of using binary code is that it can be difficult for humans to read and understand. This is why high-level programming languages were developed, which can be converted into binary code by a compiler. Additionally, manually converting a program to binary can be a time-consuming and error-prone process.