Skip to main content

Posts

Showing posts with the label Number Systems

Number Systems(Octal and Hexadecimal).

Let's start from the point where we've left in the previous slide. I previously said that Octal and Hexadecimal are useful to represent very large number, when binary number system fails to represent those in an efficient way. First we will discuss about Octal Number System. Octal Number System I have already given you the advantage of octal number system. Now let's look, what the octal number system actually is?. Octal means 8 (just like binary means 2 and decimal means 10). It means that in octal number system we have 8 distinct value i.e. 0,1,2,3,4,5,6,7.  Ok, now we know advantage of octal system and what distinct values it contains. Now, let's see how we utilize that advantage which it has over the binary number system. Octal and Binary Comparison. Converting Binary to Octal number : You can clearly see that where we require 3 bits in binary form we can represent that number easily in 1 bit of octal form. Now you might be thinking that if the number of bits is grea

Number Systems (Binary and Decimal Number Systems).

We are surrounded with Numbers.  For example a human being has 2 ears, 2 legs(generally) and one nose. These all are nothing but numbers. Now, one might ask why do we need to study numbers for c++ programming. Let me answer this one first. In the previous blog I discussed that every computer works on machine language i.e. 0s and 1s, everyone know 0 and 1 are numbers. Ok, done, But what the word "Systems" doing here? What is meant by number systems. Let's see. We all have studied about the numbers from 0 to 9 i.e. 0,1,2,3,4,5,6,7,9 and we very well know that every other number can be derived from these number except infinity(no one knows what's that). for example one thousand twenty two is 1022.  This number system that we have studied is called Decimal Number System.  Why, Decimal? Because this number system contains 10 different symbols.  (In Greek Deca or Deka means 10 and this words is derived from Deca/Deka). Ok, Now we know what is decimal number system and why