In computers, what are the basic number systems and their corresponding bases used?A. Decimal number system (Base-10).B. Binary number system (Base-2).C. Octal number system (Base-8).D. Hexadecimal number system (Base-16).E. All answers are correct.
Question
In computers, what are the basic number systems and their corresponding bases used?A. Decimal number system (Base-10).B. Binary number system (Base-2).C. Octal number system (Base-8).D. Hexadecimal number system (Base-16).E. All answers are correct.
Solution
E. All answers are correct.
Similar Questions
The number system which uses base-16 is called hexadecimal system or simply hex. A base (also called radix) is the number of unique digits or symbols (including 0) that are used to represent a given number.In hexadecimal system (or base-16 number system), a total of 16 symbols are used. Digits from 0 (zero) to 9 (nine) are used to represent values from 0 to 9 respectively and alphabets A, B, C, D, E and F (or a, b, c, d, e and f) are used to represent values from 10 to 15 respectively.In many programming languages like C, Java, etc., 0x is used as a prefix to denote a hexadecimal representation.For example, in hexadecimal number system, the value of Zero is represented as 0x0, where0 = (0 * 160) = (0 * 1)Similarly 1, 2 ...up to 9:1 = (1 * 160) = (1 * 1)2 = (2 * 160) = (2 * 1)...9 = (9 * 160) = (9 * 1)10 = A = (10 * 160) = (10 * 1)15 = F = (15 * 160) = (15 * 1)Now, let us try and represent the following numbers in hexadecimal system:Decimal number Eighteen/ 18 :Since one can only use 0 to 9 and the alphabets A to F to represent 18., let us divide 18 by 16 and write the quotient and remainder as follows:[quotient][remainder], i.e.: [1][2]18 = 0x12 = (1 * 161) + (2 * 160) = (16) + (2)One Hundred and Sixty (160).Since one can only use 0 to 9 and the alphabets A to F to represent 160., let us divide 160 by 16 and write the quotient and remainder as follows:[quotient][remainder], i.e.: [10][0], [A][0] (since 10 is represented by A)160 = 0xA0 = (10 * 161 + (0 * 160) = (160) + (0)Three Thousand Four Hundred and Sixty (3460):Since one can only use 0 to 9 and the alphabets A to F to represent 3460., let us divide it by 16 and write the quotient and remainder as follows:[quotient][remainder], i.e.: [216][4], (216 divided by 16 is [13][8], which is represented as [D][8]). So 3460 is represented as 0xD843460 = 0xD84 = (13 * 162) + (8 * 161) + (4 * 160) = (13 * 256) + (8 * 16) + (4 * 1) = (3328) + (128) + (4)Click on Live Demo to understand the conversion of a decimal number to its corresponding hexadecimal form.Note that both uppercase and lowercase letters can be used when representing hexadecimal values. For example:int hex_hundered_and_sixty = 0xA0; // or 0Xa0, however 0xA0 is preferredClick on Live Demo to understand the conversion of a hexadecimal number to its corresponding decimal form.Select all the correct statements from the given statements.In hexadecimal system, a base of 10 is used.Decimal number 101 is equal to 0x65 in hex.Hex value of 0xCAFE is equal to the decimal value 51966.0x0001 in hex is equal to 0X1 in hex to 1 in decimal number system.
The number system that uses base-2 is called binary number system while the number system that uses base-8 is called octal number system.In binary system (or base-2 number system,) a total of 2 digits (0 and 1) are used to represent a number of any size (magnitude), whereas in octal system (or base-8 number system,) a total of 8 digits (0, 1, 2, 3, 4, 5, 6 and 7) are used to represent a number of any size (magnitude).The largest digit in octal system is (7)8. Number (7)8 in binary is represented as (111)2. In binary system, three binary digits (bits) are being used to represent the highest octal digit.While converting an octal number to a binary number, three bits are used to represent each octal digit.The following table shows the conversion of each octal digit into its corresponding binary digits.Octal 0 1 2 3 4 5 6 7Binary 000 001 010 011 100 101 110 111For example, an octal number 0246 is converted to its corresponding binary form asOctal Number -> 2 4 6Binary Number -> 010 100 110Hence, 0246 is (010100110)2.Click on Live Demo to understand the conversion of octal number to its corresponding binary number.Similarly, while converting a binary number into its octal form, the binary number is divided into groups of 3 digits each, starting from the exterme right side of the given number . Each of the three binary digits are replaced with their corresponding octal digits.If the group of binary digits to the extreme left side of the number do not have three digits, the required number of zeros are added as a prefix to get three binary digits.For example, let us try and convert a binary number 1101100 into its corresponding octal number.Binary Number -> 1 101 100Binary Number -> 001 101 100 // After prefixing zeros on the extreme left side of the groupOctal Number -> 1 5 4Hence, the octal equivalent of the given binary 1101100 is 0154Click on Live Demo to understand the conversion of a binary number to its corresponding octal form.Select all the correct statements from the given statements.(369)8 is an octal number.Each octal digit is represented using three bits.Binary number (10101010)2 is equivalent to the octal number (252)8.An octal number (364)8 is equivalent to the binary number (011110100)2.
In a base n number system, all numbers are written using only the digits {0,1,..,n−1}. For example, in the decimal (= base 10) number system that you are used to using, all numbers are written using the digits 0,1,..,9, whereas in the binary (= base 2) number system that your computer uses, all numbers are written using the digits 0 and 1 only.Write a function basenum(num, base) that takes as arguments num (a non-negative integer) and base (a non-negative integer not greater than 10), and returns True if all digits of num are strictly less than base and False otherwise (using lazy evaluation). Once again, expect to be tripped up by the first hidden test if you do not use lazy evaluation.For example:>>> basenum(12345, 2)False>>> basenum(12345, 8)True>>> basenum(10110, 2)True>>> basenum(9, 5)False
The numbering system which uses base-8 is called octal system. A base (also called radix) is the number of unique digits or symbols (including 0) that are used to represent a given number.In octal system (or the base-8 system), a total of 8 digits (0, 1, 2, 3, 4, 5, 6 and 7) are used to represent a number of any size (magnitude).For example, Zero is represented as 0, where0 = (0 * 80) = (0 * 1)Similarly the numbers 1 One (1), 2 and 7 are represented as follows: :1 = (1 * 80) = (1 * 1)2 = (2 * 80) = (2 * 1)...7 = (7 * 80) = (7 * 1)Now, let us try to represent the following numbers in octal system:Eighteen (18): Since 0 to 7 are the only digits that can be used to represent 18, let us divide 18 by 8 and write the quotient and remainder as follows:[quotient][remainder], i.e.: [2][2]18 = (2 * 81) + (2 * 80) = (16) + (2)Four Hundred and Twenty One (421): Since 0 to 7 are the only digits that can be used to represent 421,, let us divide it by 8 and write the quotient and remainder as follows:[quotient][remainder], i.e.: [52] [5] (further dividing 52 by 8 we get [6][4]), which is [6][4][5]421 = (6 * 82) + (4 * 81) + (5 * 80) = (384) + (32) + (5)Click on Live Demo to understand the conversion of decimal number system to octal number system.In order to differentiate from decimal numbers, octal numerals are prefixed with a leading 0 (zero).For example, to store an octal value of seven into a variable number_seven, we writeint number_seven = 07;Similarly, if we want to store an octal representation of a decimal number 9 in a variable number_nine, we writeint number_nine = 011;Click on Live Demo to understand the conversion of octal number system to decimal number system.Select all the correct statements from the given statements.In octal system, the base is 10.In octal system, decimal value of 20 is represented as 21In octal system, decimal 8 is represented as 10In octal system, decimal of 10 is written as 012
In computers we normally use four different numbering systems - Decimal, Binary, Octal and Hexadecimal.The decimal system is a number system which is used in our day-to-day transactions like currency,counting etc. In this system,the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are used to denote various numbers.In Binary number system, 0's (zeros) and 1's (ones) are the only symbols that are used to represent numbers of all magnitudes (sizes). For example, a normal decimal number 3 (three) is represented in a binary as 11. We shall learn more about it in the later sections.Binary system is mostly used in computers and other computing devices.A number in a particular base is written as (Number)base of number. For example (34)10 is a decimal number (Thirty Four) and (11)2 is a binary number 11 (it is read as One One and not as Eleven) which actually represents a decimal number whose value is 3.Since the decimal number system is more commonly used,the decimal number (124)10 is simply written as 124. However, if the same number has to be represented in binary system, it is written as (1111100)2.Similarly, the octal number system uses 8 as its base. It is generally used in digital displays and in representing file permissions under UNIX/Linux operating systems.Hexadecimal system or Hex is a number system that uses 16 as the base to represent numbers. We shall learn more about octal and hexadecimal number systems in the later sections.Select the correct statements from the given statements.A number system that uses only two digits, 0 and 1 is called Binary number system.The ten digits used in the decimal number system are from 1 to 10.The two symbols 0 and 1 are known as bits in a binary system.The base of an octal system is 8.Close
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.