answersLogoWhite

0


Best Answer

Convert each hex digit to four binary digits. If you get less than three (for example, 7 --> 111), fill it out with zeroes to the left (in this case, 0111).

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert hexadecimal 4c.B7 to Binary?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What does hexadecimal base 16 convert binary equal?

16 is the 4th power of 2. So a hexadecimal number is converted to binary by replacing each hex digit by the 4-bit binary number having the same value. Conversely, in converting binary to hexadecimal, we group every 4 bits starting at the decimal (binary?) point and replace it with the equivalent hex digit. For example, the hexadecimal number 3F9 in binary is 1111111001, because 3 in binary is 11, F (decimal 15) is 1111, and 9 is 1001.


Why people are using Hexadecimal rather than binary numbers while doing programs?

hexadecimal can express 16 bit binary in 4 place form, not 16.


What is the 4-binary number assoiated with the hexadecimal symbol C?

0xc = 1100 Hexadecimal digits use exactly 4 binary digits (bits). The 0x0 to 0xf of hexadecimal map to 0000 to 1111 of binary. Thinking of the hexadecimal digits as decimal numbers, ie 0x0 to 0x9 are 0 to 9 and 0xa to 0xf are 10 to 15, helps with the conversion to binary: 0xc is 12 decimal which is 8 + 4 → 1100 in [4 bit] binary.


Write a program that prints a table of the binary octal and hexadecimal equivalents of the decimal numbers in the range 1 through to 256?

import java.util.Scanner; public class NumberSystem { public void displayConversion() { Scanner input = new Scanner(System.in); System.out.printf("%-20s%-20s%-20s%-20s\n", "Decimal", "Binary", "Octal", "Hexadecimal"); for ( int i = 1; i <= 256; i++ ) { String binary = Integer.toBinaryString(i); String octal = Integer.toOctalString(i); String hexadecimal = Integer.toHexString(i); System.out.format("%-20d%-20s%-20s%-20s\n", i, binary, octal, hexadecimal); } } // returns a string representation of the decimal number in binary public String toBinaryString( int dec ) { String binary = " "; while (dec >= 1 ) { int value = dec % 2; binary = value + binary; dec /= 2; } return binary; } //returns a string representation of the number in octal public String toOctalString( int dec ) { String octal = " "; while ( dec >= 1 ) { int value = dec % 8; octal = value + octal; dec /= 8; } return octal; } public String toHexString( int dec ) { String hexadecimal = " "; while ( dec >= 1 ) { int value = dec % 16; switch (value) { case 10: hexadecimal = "A" + hexadecimal; break; case 11: hexadecimal = "B" + hexadecimal; break; case 12: hexadecimal = "C" + hexadecimal; break; case 13: hexadecimal = "D" + hexadecimal; break; case 14: hexadecimal = "E" + hexadecimal; break; case 15: hexadecimal = "F" + hexadecimal; break; default: hexadecimal = value + hexadecimal; break; } dec /= 16; } return hexadecimal; } public static void main( String args[]) { NumberSystem apps = new NumberSystem(); apps.displayConversion(); } }


How do you convert the hexadecimal number ff to binary?

Any base that is itself a power of 2 is easily converted to and from binary. With base 4, each digit represents 2 bits. With base 8 (octal), each digit represents 3 bits. And with base 16 (hexadecimal), each digit represents 4 bits. Thus two hexadecimal digits represent an 8-bit binary value. This is convenient because we typically refer to a unit of computer memory as an 8-bit byte, thus every byte value can be represented using just 2 hex digits. If we had a system with a 9-bit byte we'd use 3 octal digits instead. A 24-bit value can either be represented using 6 hex digits or 8 octal digits. To convert a hexadecimal value to binary, we simply consult the following table (note that 0x is the conventional prefix for a hexadecimal value): hex = binary 0x0 = 0000 0x1 = 0001 0x2 = 0010 0x3 = 0011 0x4 = 0100 0x5 = 0101 0x6 = 0110 0x7 = 0111 0x8 = 1000 0x9 = 1001 0xA = 1010 0xB = 1011 0xC = 1100 0xD = 1101 0xE = 1110 0xF = 1111 Here, hexadecimal digit 0xF has the binary value 1111, thus 0xFF would be 11111111. Note that the bit patterns are in the same order as the hexadecimal digits. Thus 0x0F becomes 00001111 and 0xF0 becomes 11110000. Knowing this, we can easily convert binary values into hexadecimal, we simply divide the binary value into groups of 4 bits and convert each group to the corresponding hex digit. Thus 101101001100 becomes B4C (1011=B, 0100=4 and 1100=C). If there aren't enough bits, we simply pad the first group with leading zeroes. We can use a similar technique to convert between octal and binary, we simply divide the bits into groups of 3: octal = binary 00 = 000 01 = 001 02 = 010 03 = 011 04 = 100 05 = 101 06 = 110 07 = 111 Note that a leading 0 is the conventional prefix for octal values. Thus binary value 100010 would be written 042 in octal to avoid confusion with 42 decimal.