r/computerscience • • Oct 22 '26

How are objects seperated in a computer?

A computer holds 0s and 1s and nothing apart from it,so a letter can be stored as an ASCII or other representation,a number in its binary, an image in its pixel etc. But how is it differentiated. Say I'm saving an image, I need to store its pixels, colour format and all. So,how are they differentiated, saying this is for colour,this is for objects and also the same with video or document?

64 Upvotes

56 comments sorted by

View all comments

Show parent comment

1

u/lgastako Oct 23 '26

Not all file formats have headers. Sometimes the file is just expected to be in a certain format because of the context.