Author Topic: 8 bit binary problem  (Read 1354 times)

0 Members and 1 Guest are viewing this topic.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
8 bit binary problem
« on: November 30, 2014, 11:25:23 am »
How do you represent 2635 in 8bit binary? I guess you can't - it's too big for 8bits (127)?
« Last Edit: November 30, 2014, 12:06:46 pm by Kulverstukas »

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: 8 bit binary problem
« Reply #1 on: November 30, 2014, 11:53:56 am »
8 bits is 1 byte which has a max of 255. A integer is 4 bytes (32 bits).
~Factionwars

Offline madf0x

  • Knight
  • **
  • Posts: 172
  • Cookies: 50
    • View Profile
Re: 8 bit binary problem
« Reply #2 on: November 30, 2014, 06:55:48 pm »
Sure you can. All you have to do is destroy the typical representation of 1s and 0s. If you're willing to sacrifice being able to represent other numbers/information you could make 8bits represent whatever you want. Remember even binary is simply an abstraction of information, and abstractions can change. You'd likely lose interoperability or require a translation mechanism of some sort.

Offline freeuser

  • NULL
  • Posts: 2
  • Cookies: 0
    • View Profile
Re: 8 bit binary problem
« Reply #3 on: September 23, 2015, 01:36:45 pm »
The max number that can be representable in 8 bit is 256 so it's impossible.

Offline RedBullAddicted

  • VIP
  • Sir
  • *
  • Posts: 519
  • Cookies: 189
    • View Profile
Re: 8 bit binary problem
« Reply #4 on: September 23, 2015, 06:54:49 pm »
The max number that can be representable in 8 bit is 256 so it's impossible.

Maybe you should have read Stackprotectors post first. pow( 2, 8 ) is 256.. thats correct. But it only means that one byte (8 bits) can represent 256 different values which are 0 - 255 (cause 0 is a value you have to count, too). Necroing an old thread just to provide wrong information isn't such a good start, is it? :P
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 khofo

  • EZ's Swashbuckler
  • Knight
  • **
  • Posts: 350
  • Cookies: 25
  • My humor is so black, it could go cotton picking.
    • View Profile
Re: 8 bit binary problem
« Reply #5 on: September 24, 2015, 12:33:56 am »
The max number that can be representable in 8 bit is 256 so it's impossible.
Quote from: #Evilzone
<Spacecow18> priests are bad ppl
<Insanity> Holy crap
Of course God isnt dead. He's out there partying with the Easter Bunny, Santa Clause, Tooth Fairy, and the Man on the moon...
Some of my work: Introduction to Physical Security

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: 8 bit binary problem
« Reply #6 on: September 24, 2015, 10:10:11 am »
</thread>
~Factionwars