Computers use binary number systems because they allow computers to store and process data most simply and efficiently using just transistors and electronic switches that have two states – ON and OFF. This makes binary the best numeric system for computer hardware and software architecture.
Unlike the decimal number system which has 10 digits from 0 to 9, the binary system has only two digits – 0 and 1. This perfectly aligns with the two states of a transistor or switch in a computer. ON represents 1 and OFF represents 0.
Representing data in binary format allows computers to encode large amounts of data as sequences of binary digits or bits. A computer processor can perform fast logical and arithmetic operations on these bit patterns. It is much simpler for a processor to differentiate between two states rather than ten states in decimal or more in other number systems.