Thursday, March 18, 2021
Wednesday, March 17, 2021
Introduction to Computers - Part 2
March 17, 2021
No comments
Digital Logic: Representing in Numbers
Welcome back! So now we know everything a computer does is calculations. but what does it calculate and how ? Let's dive into it.
We've got many types of systems, Binary, Decimal, Octal and Hexadecimal, we're all familiar with the decimal number system having 10 digits, 0 to 9 therefore called base 10 system(10 digits). We all know the decimal system so why don't we use it and why binary ?(base 2 system), because of the transistors. We know that a transistor has only two states on and off so to represent that we use the binary system, 0 representing off and 1 representing on states. Hexadecimal system has digits from 0-f, i.e 0-9, then a represents 10, b represents 11 and so on till f which represents 15.
Representing in Binary
Basically, a computer compares 1s and 0s billions of times a second, everything we see is represented in terms of 1s and 0s. Let us take an example of a screen, the screen you see in front of you is actually a collection of pixels or minute boxes with each box having a different colour and together forms the visual we see. and each colour can be expressed in terms of the primary colours red, green and blue and their varied intensities creates all colours. This in turn can be represented as numbers(binary). Those numbers tell the computer how fully to turn on each of the primary colour "lights" in an individual pixel. If red was set to 0, that means the red "light" is completely off. If the red "light" was set to 255, that would mean the "light" was fully on.
Word CAT represented in Binary |
What is up with 0 and 255 ?
So each 0 or 1, is called a bit and in the earlier days of computing, we utilized 8 bits or a combination of 8 digits of 0s and 1s (1 byte) to represent a character. So we could represent 2^8 characters i.e. 256 (0 to 255 values). Each character was assigned a value called an ASCII value and that value could be represented by a byte. But then more and more characters came into being, like the emojis and we needed more values, so other encoding formats were used, the most prevalent encoding standard used now is the UTF-8 standard, it used the same ASCII values, but what set it apart is that it allowed to use multiple bytes, to represent a single character than a single byte.
Emoji Represented in Hexadecimal which can be further expressed in binary |
So that's a lot to take in, take it in and think it through, how complicated but simple isn't it ? So next let's begin to dive into some more hardware and begin to understand how this voltage or the 0s and 1s travel around and make sense, in our next article!
Akhil Hakkim
S1- IT (2020-2024)