Now we know that how to convert number into binary.What if we want to store alphapet or some other special characters.What if we wanna store float value like 0.5
.If we want to store characters then first we have to convert the character to number.Like every number has binary every character has number value.so we can easily convert the character to binary.
character -> number -> binary
.Yeah there is a problem.we are storing 'A' into memory.'A' is 97.when retrieving that 'A' from memory we will get '97'.Now how do we know it is a character 'A' or number '97'.Because in binary we use same binary digits for '97' and 'A'.
Now the data types comes in.Have you ever asked why there is .mp3 at an end of the audio filename?Have you ever asked why there is .mp4 at an end of video filename? because of this issue we have faced with characers.since we can store only binary in memory, we have to tell the computer what type it is? Speaking of types we know various types of numbers .we can't store 1/2 . we have to convert it to 0.5 .we can't store square root 2.we have to store 1.44.Don't think computer cant find what is 1/2 or sqrt 2.we are talking about memory.Not about the processor.computer can do maths.That's why they are.As i told you earlier they can't do anything automatically.That's why you are here. let's continue memory.so we have to tell the computer what we are storing in memory.That's DataTypes.In programming we will be using many types.Represenataion for this can vary for every programming languages.but the meaning is same.
  1. Integers
    Integers are numbers There is positive, negative and zero.
  2. Characters
    a number also could be a character.but those are not actual numbers.just a representive format.alphabets, numbers and other special characters.
  3. Float
    Numbers with points example: 0.25
    it also could be signed.

there is more types each language offers us.