How many characters can you store with 1 byte?

前端 未结 4 1775
深忆病人
深忆病人 2020-12-12 19:20
1 byte = 8 bits 

So, does this mean 1 byte can only hold one character? E.g.:

\"16\" uses 2 bytes , \"9\" uses 1 byte , \"a\" uses          


        
4条回答
  •  醉话见心
    2020-12-12 19:51

    1 byte may hold 1 character. For Example: Refer Ascii values for each character & convert into binary. This is how it works.

    enter image description here value 255 is stored as (11111111) base 2. Visit this link for knowing more about binary conversion. http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html

    Size of Tiny Int = 1 Byte ( -128 to 127)

    Int = 4 Bytes (-2147483648 to 2147483647)

提交回复
热议问题