May 16, 2008

Hex Or Binary

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Assembler and Delphi

free web hosting

Hex Or Binary

Hakkera
This my sound like a bit of a noob question, but it has always occured to me. On screen, we get hexadecimal code, but the processor doesnt understand that right? So, if I make a program in Hex, would I have to compile it, I understnad that Hex is shorthand binary, but would I?


Reply

osknockout
Lol, we're all noobs sometime. laugh.gif
You wouldn't have to compile it.
You'd just have to find a way to save it in that format, like through a hexadecimal editor,
because normally data is saved in bytes (1 byte= 2 hexes = 256 binary bits)

Reply

ghostrider
QUOTE
This my sound like a bit of a noob question, but it has always occured to me. On screen, we get hexadecimal code, but the processor doesnt understand that right? So, if I make a program in Hex, would I have to compile it, I understnad that Hex is shorthand binary, but would I?


I don't quite understand what you mean by 'Hexadecimal Code'. Can you elaborate? I should be able to answer your question, I've been writing in assembly for 3 years. If your talking about data, such as:

CODE

Somedata db 0FFh


Then that will be turned into binary when it compiles. Or if you mean you are writing a program totally in Hex, that will work too. The compiler will convert that into code that the computer can understand.

Also,
QUOTE
(1 byte= 2 hexes = 256 binary bits)


The above is wrong. 1 byte consists of 8 bits, thus making 256 possible characters.

 

 

 


Reply

osknockout
QUOTE
The above is wrong. 1 byte consists of 8 bits, thus making 256 possible characters.

Ah! Sorry about that. Heh, you'd think after programming in Z80 assembly for 4 years
you'd get that down. laugh.gif Anyway, ghostrider's right.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:


Searching Video's for hex, binary
advertisement



Hex Or Binary



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE