signed char storage

This is a discussion on signed char storage within the C Programming forums, part of the General Programming Boards category; The signed char uses 7 bits to store values and 8th bit to store the sign. If all the seven ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    2

    Question signed char storage

    The signed char uses 7 bits to store values and 8th bit to store the sign. If all the seven bits contain 1 then the max value that can be stored is +127, then how is -128 stored in case of signed chars.

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072

    Re: signed char storage

    Originally posted by Leo_Vinay
    how is -128 stored in case of signed chars.
    0x80 (€)
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 07:02 AM
  2. Replies: 12
    Last Post: 08-12-2008, 12:02 AM
  3. I'm having a problem with data files.
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 05-14-2003, 10:40 PM
  4. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21