• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

byte range...

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this true/false.
As per Marcus Mock Test 3 qno 10)
A byte can represent between -128 to 127
( between does not include -128 & 127)
I think this is false if it does not include -128 & 127
Any comments!
Thanks.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you specify between, it will always include upto and including the range numbers. So the question is framed correctly, in my opinion.
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree. The question is good.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm. When I see "between" I assume it doesn't necessarily include the endpoints unless it's said to be inclusive. However I don't think that matters for this problem - they didn't say that a byte could only represent values between -128 and 127, so it doesn't matter if they left out two possible values. They could also have said "a byte can represent values between -100 and 100" and the answer would still be true. Not as informative as it could be, but still true.
Now, a better way to phrase this answer would have been: "a byte can represent values from -128 to 127." Then we'd all be happy.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic