How do you represent a negative number in Binary Coded Decimal?
All I know is that when a number is negative, you convert the decimal into binary and if it is negative you put 1111 before the binary digits.
What is the algorithm for converting binary numbers to decimal. Decimal to binary and hexadecimal to binary?
"Ordinary" numbers are on base 10 (="decimal"). Binary only has 2 digits. 0 and 1 (representing "on" or "off" in some circuits). So "conversion" is how to represent an number in one to how it appears in the other. So 10 (binary) means 1x21 + 0x20 , which is 2. Decimal to binary effectively means representing an ordinary ("decimal") number in binary form. So 10 (decimal) is broken up into powers of 2 as 8+2…
What is the advantage of having the binary number system to represent data inside the computer instead of the decimal number system?
It is the same number: 1. Binary numbers are base-2, with each digit place corresponding to an exponent of 2 rather than 10 in the decimal number system. So that the number 11, which in decimal means 10 + 1, would represent 2 + 1 (3) in the binary system, which can only have the value 0 or 1 in each digit place.