Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Bits

Name: Anonymous 2011-12-05 17:33

Hi /prog/rammers...

I'm an hobby programmer and I'm here to ask a really simple question... I tried to google it but I don't even know where to start my search

the notation:
0x00 = 00000000
how it is called?
how can I convert an 8bit array in this form?
for example how can I discover the notation or the bit pattern?
?? = 00110100
0xff = ??

can someone explain me the logic behind?

thank you...

Name: Anonymous 2011-12-05 19:38

>>1

Numbers can be represented textually in a variety of forms. The most common used system is the positional notation, using the base ten. However, one can devise a positional notation for numbers in any particular numeric base, using any set of symbols to represent the digits (which is a concept particularly bound to this notation). In computing, it is also pretty common to use the base two (popularly called "binary"), base eight ("octal") and base sixteen ("hexadecimal"). These bases are interesting because they relate directly to the electronic signals which represents the numbers themselves (the "bits"). Roughly speaking, a binary digit is equivalent to a single bit, whereas an octal digit is equivalent to three bits, and an hexadecimal digit is equivalent to four bits.

Now, the 0 and 0x prefixing a number is present only to allow lexical scanners to quickly identify the base in which a (possibly ambiguous) string representing such number is written. These prefixes do not take part on the number itself. In some languages, like VHDL, one can explicitly tell the base in which a number is encoded textually, for example #13#12281A0#.

To convert between numeric bases in the positional system, there are tons of articles online explaining the process.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List