• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

binary representation

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!!! guys
well here is some text from RHE book
on page 48
original data= 192
in binary =00000000000000000000000011000000
all i want to know is how to represent -192 in binary
and on page 50
it says
shifts of ints use only the low-order 5 bits and of longs only
low-order 6 bits of right operand.
what it mean.
thanxxx in advance
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
192==11000000.
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[QUOTE}in binary =00000000000000000000000011000000
all i want to know is how to represent -192 in binary
Hi,
I think what you need to do is ~ this int variable then add 1.for example:
00000000000000000000000011000000
11111111111111111111111100111111 +1 =
11111111111111111111111101000000 = -192
if you wanna know how the float or double type data express negative data, i think there is complex so u can check book.

and on page 50 it says
shifts of ints use only the low-order 5 bits and of longs only
low-order 6 bits of right operand. what it mean.


without the context, i cannot understand what your quote means. COuld u quote more from book?
regds
George
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic