DEV Community

Cover image for Bits,Bytes,ASCII and Unicode
Faizan Firdousi
Faizan Firdousi

Posted on

Bits,Bytes,ASCII and Unicode

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay