Bit- smallest unit of data , a bit can be either a 0 or a 1.Think of a bit as a single switch that can be either off (0) or on (1).
Byte - a byte consists of 8 bits it can represent 256 different values because 2^8 so a byte can store values from 0 t 255.
In most encoding systems, a byte is used to store a character.
the original ASCII code uses 7 bit to store values that means 2^7= 128 slots for assigning character different types of values, but you know this is not enough ,so then comes unicode
Unicode as Compared to ASCII, which uses only one byte to represent a single character, Unicode uses up to four bytes. This gives it the capability to support a wide variety of encoding systems.
1 byte = 8 bits and as you can see in a ASCII chart for example a
has value 97 is represented as 01100001
(the binary for 97) which are 8 digits/bits in ASCII but in unicode you have to type 32 digits containing combination of 0 and 1 in unicode for obtaining a a
alphabet.
it so in unicode it will store 2^32 which is 4 billion, 294 million, 967 thousand, 296 of slots
Top comments (0)