Author Topic: Alphabets to binary  (Read 2175 times)

0 Members and 1 Guest are viewing this topic.

Offline D4rKn355

  • Serf
  • *
  • Posts: 22
  • Cookies: 0
  • This is it... This is where i belong...
    • View Profile
Alphabets to binary
« on: November 09, 2012, 07:36:53 am »
I m curious that how are alphabets changed to binary. If they use the Unicode number representing these alphabets, then why aren't they mixed up with numbers? the binary value of numbers can be the same with the binary value of alphabets right? Could you explain me deeply?


Edit: i mean that why the numbers aren't mixed up or confused with the binary of the alphabets. Computer store both of them with 0s and 1s. How can computer differentiate them?
« Last Edit: November 09, 2012, 03:30:55 pm by D4rKn355 »
1010100 1101000 1101001 1110011 100000 1101001 1110011 100000 1101111 1110101 1110010 100000 1110111 1101111 1110010 1101100 1100100 100000 1101110 1101111 1110111 101110 101110 101110 100000 1010100 1101000 1100101 100000 1110111 1101111 1110010 1101100 1100100 100000 1101111 1100110 100000 1100101

Offline RedBullAddicted

  • VIP
  • Sir
  • *
  • Posts: 519
  • Cookies: 189
    • View Profile
Re: Alphabets to binary
« Reply #1 on: November 09, 2012, 07:53:55 am »
Hi,

I am not sure if I understood you question correctly, you are asking how to get the binary value of a latter? Well... first you need to look at the ASCII value of the specific character.



for example the capital A has a decimal value of 65 which is 0x41 in hex. You can easily represent that decimal value in binary. As you may have noticed there is no decimal value higher than 255 which means you wont need more than one byte (=8 bits). The capital A for example would look like that: 01000001 . How do you calculate that? Its pretty easy! each bit represents a decimal value first: 1, second: 2, third: 4, fourth: 8, fifth: 16, sixth: 32, seventh: 64, eighth: 128. If you sum all these together you end up with 255 (0 -> 255 = 256 possibilities). As for the example with the capital A 1+64 = 65 and the decimal number 65 represents the ASCII value A. Hope this helps.

Cheers,
RBA
Deep into that darkness peering, long I stood there, wondering, fearing, doubting, dreaming dreams no mortal ever dared to dream before. - Edgar Allan Poe

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: Alphabets to binary
« Reply #2 on: November 09, 2012, 08:50:27 am »
I m curious that how are alphabets changed to binary. If they use the Unicode number representing these alphabets, then why aren't they mixed up with numbers? the binary value of numbers can be the same with the binary value of alphabets right? Could you explain me deeply?
Yes, but they are not confused with numbers because of how they are stored.

Technically, everything is 0 and 1 in comp data.
But still we are able to differentiate numbers, instruction codes, addresses etc. it's all about encoding.
read about multiplexers and you'll get it.
"Always have a plan"

Offline D4rKn355

  • Serf
  • *
  • Posts: 22
  • Cookies: 0
  • This is it... This is where i belong...
    • View Profile
Re: Alphabets to binary
« Reply #3 on: November 09, 2012, 03:29:16 pm »
Sorry That my question is kinda confusing, i m not native english. Anyway back to the topic, @p_2001 that was exactly what i am asking about. Can you go in deep on it?
And @RedBullAddicted it really help me, thanks.
1010100 1101000 1101001 1110011 100000 1101001 1110011 100000 1101111 1110101 1110010 100000 1110111 1101111 1110010 1101100 1100100 100000 1101110 1101111 1110111 101110 101110 101110 100000 1010100 1101000 1100101 100000 1110111 1101111 1110010 1101100 1100100 100000 1101111 1100110 100000 1100101

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: Alphabets to binary
« Reply #4 on: November 09, 2012, 05:26:27 pm »
Sorry That my question is kinda confusing, i m not native english. Anyway back to the topic, @p_2001 that was exactly what i am asking about. Can you go in deep on it?
And @RedBullAddicted it really help me, thanks.

hmm.. Look everything in a computer comes in 0 and 1. It all boils down to machine code.
It's all encoded in 0 and 1.
now, i don't remember everything the actual encoding but for example. (hypothetical).. I don't remember the actual.
All addressing instruction codes  well start with 0.. Now, if it is direct addressing, the second bit will be again 0 and if indirect, it will be 1. So, the register value are individually used to determine exactly what hardware to employ, like the adder, the logical OR etc.

similarly, at higher level encoding is again done to identify what is what.
Like, just eg. 000 before a number would mean it is a string
And 001 would mean it is integer.

So, the bits preceding it will decide what the days is treated as.

For actual encoding look up some books.
« Last Edit: November 09, 2012, 05:27:17 pm by p_2001 »
"Always have a plan"

Offline D4rKn355

  • Serf
  • *
  • Posts: 22
  • Cookies: 0
  • This is it... This is where i belong...
    • View Profile
Re: Alphabets to binary
« Reply #5 on: November 10, 2012, 02:33:16 pm »
Thanks bro I get it now.
1010100 1101000 1101001 1110011 100000 1101001 1110011 100000 1101111 1110101 1110010 100000 1110111 1101111 1110010 1101100 1100100 100000 1101110 1101111 1110111 101110 101110 101110 100000 1010100 1101000 1100101 100000 1110111 1101111 1110010 1101100 1100100 100000 1101111 1100110 100000 1100101

Offline Daemon

  • VIP
  • Baron
  • *
  • Posts: 845
  • Cookies: 153
  • A wise man fears a gentle mans anger
    • View Profile
Re: Alphabets to binary
« Reply #6 on: November 10, 2012, 04:53:24 pm »
This lifestyle is strictly DIY or GTFO - lucid

Because sexploits are for h0edays - noncetonic


Xires burns the souls of HF skids as a power supply

Offline relax

  • Sir
  • ***
  • Posts: 562
  • Cookies: 114
  • The one and only
    • View Profile
Re: Alphabets to binary
« Reply #7 on: November 10, 2012, 10:19:28 pm »
The capital A for example would look like that: 01000001 ... value first: 1, second: 2, third: 4, fourth: 8, fifth: 16, sixth: 32, seventh: 64, eighth: 128.
As for the example with the capital A 1+64 = 65 and the decimal number 65 represents the ASCII value A.

sry but issent 01000001 2+128=130???
65(A) sould be 10000010 no????

Offline RedBullAddicted

  • VIP
  • Sir
  • *
  • Posts: 519
  • Cookies: 189
    • View Profile
Re: Alphabets to binary
« Reply #8 on: November 11, 2012, 12:03:32 pm »
Hi relax,

1 byte (8 bits) can be any number between 0 and 255.

1       1    1     1    1   1  1  1
128+64+32+16+8+4+2+1 = 255

10000010 = 128+2 =130
01000001 = 64+1 = 65

Cheers,
RBA
Deep into that darkness peering, long I stood there, wondering, fearing, doubting, dreaming dreams no mortal ever dared to dream before. - Edgar Allan Poe

Offline relax

  • Sir
  • ***
  • Posts: 562
  • Cookies: 114
  • The one and only
    • View Profile
Re: Alphabets to binary
« Reply #9 on: November 11, 2012, 12:17:14 pm »
Hi relax,

1 byte (8 bits) can be any number between 0 and 255.

1       1    1     1    1   1  1  1
128+64+32+16+8+4+2+1 = 255

10000010 = 128+2 =130
01000001 = 64+1 = 65

Cheers,
RBA

hmm weird i thought it was counted increasing 1,2,4,8,16,32,64,128
insted of decreasing 128,64,32,16,8,4,2,1

thanks for clearing that up :P

Offline Daemon

  • VIP
  • Baron
  • *
  • Posts: 845
  • Cookies: 153
  • A wise man fears a gentle mans anger
    • View Profile
Re: Alphabets to binary
« Reply #10 on: November 12, 2012, 07:38:32 pm »
hmm weird i thought it was counted increasing 1,2,4,8,16,32,64,128
insted of decreasing 128,64,32,16,8,4,2,1

thanks for clearing that up :P

Read bluchills description. I messed up >.<
« Last Edit: November 16, 2012, 06:17:29 am by Daemon »
This lifestyle is strictly DIY or GTFO - lucid

Because sexploits are for h0edays - noncetonic


Xires burns the souls of HF skids as a power supply

Offline bluechill

  • Cybermancer
  • Royal Highness
  • ****
  • Posts: 682
  • Cookies: 344
  • I am the existence in these walls
    • View Profile
Re: Alphabets to binary
« Reply #11 on: November 16, 2012, 02:52:56 am »
Depends on the computer architecture. x86 is big endian which means the high order bits are on the left and low order on the right. Little endian is the reverse and is used by Sparq computers I believe, not 100% tho

x86 and x86_64 is little endian.  IA64 (Intel's failed x64 version of x86) & Arm can be either Big Endian or Little Endian as you can switch it in program execution.  Big Endian means the most significant bit first where as Little Endian is the least significant bit first.  Big Endian is like how we write 1.234 in a decimal.  Little Endian is the reverse so it would be 432.1.
I have dreamed a dream, but now that dream has gone from me.  In its place now exists my own reality, a reality which I have created for myself by myself.

Offline Daemon

  • VIP
  • Baron
  • *
  • Posts: 845
  • Cookies: 153
  • A wise man fears a gentle mans anger
    • View Profile
Re: Alphabets to binary
« Reply #12 on: November 16, 2012, 06:16:59 am »
Holy shit I got it backwards. My mistake guys, i'll edit my post. Wow...that was so fail. Thanks for the correction Bluechill
This lifestyle is strictly DIY or GTFO - lucid

Because sexploits are for h0edays - noncetonic


Xires burns the souls of HF skids as a power supply