answersLogoWhite

0

How do you work out binary codes?

Updated: 8/10/2023
User Avatar

Desray

Lvl 1
8y ago

Best Answer

In binary code there are only two possible characters: 1 and 0. These two characters are basically yes and no. 1 means true, and 0 means false.

Every letter or number is represented by 8 digits, also known as 8 bits. For example, the number 23 in binary code would be 00010111, 8 digits/bits. Each digit is a bit.

Once you understand that, you can move on to reading binary code.

Each of the 8 bits have a value. The rightmost number always represents 1. The next number on the left represents 2. The next number is 4. Next number is 8. In case you didn't notice, the value keeps multiplying by 2. Here is what each number represents:

0128 064 132 016 18 04 12 01

Where there is a 0 it means to ignore that value. However, wherever there is a 1, you must add that value to the total.

So, for the binary number above, you find where the 1s are, and then you add them together.

There is a 1 at 32, 8, and 2. This means you add 32, 8, and 2 together, and get 42.

Thus, 00011010 represents 26. 26 is a decimalcharacter.

The more commonly used text format is ASCII, which is just normal text and symbols like "$#@%(".

Decimal characters are numbers. To convert binary code to ASCII, you must first convert it to decimal, like we did above. Now that we have 42, we must find out what it is in ASCII.

The decimal numbers 65-90 represent upper-case, where "A" is 65, "B" is 66, so on.

The decimal numbers 97-120 represent lower-case a-z, where "a" is 97, "b" is 98, etc.

42 is not 65-90 or 97-120. This means it is a symbol/special character. To find what a certain symbol is in decimal, then you need to to search the web. 42 is a *.

An easier way to do this, is that if the binary number starts with 011, then you know that this is a lower-case letter. If t it starts with 010, that means it is an upper-case letter. After reading these first three digits, you just determine the other 5 digits separately, and whatever number you get for the 5 digits, is the place in the alphabet that the letter is. For example, if the 5 digits added up to 4, the letter would be d.

Try decoding the message below. The 00100000 is a space.

01001110 01101001 01100011 01100101

00100000

01001010 01101111 01100010

Hopefully, now you understand reading binary code. Finally, this is how to write binary code.

If you are writing a number, then do the following:______________________________________

We'll use 57 as an example here. Starting at the leftmost digit in the binary number, check if your number is equal to or greater than the value that this digit represents. If this is the 8th digit from the right, it represents 128. If your number is greater or equal to it, then you put a 1 and subtract the value from your number. Otherwise you put a 0. Then you go to the next number and do the same. Keep repeating until your number is subtracted to 0.

57 is not greater than 128, so we put a 0 here and go to the next digit, which would represent 64.

57 is not greater than 64, so we put a 0 again and go to the the next digit, representing 32.

57 is greater than 32, so we put a 1 here and subtract 32 from 57 which is 25. Next digit, 16.

25 is greater than 16, so we put a 1. Then 25 - 16 = 9. Next digit is 8.

9 is greater than 8, so we put a 1. 9 - 8 = 1. Next digit is 4.

1 is not greater than 4. Put 0. Next digit, 2.

1 is not greater than 2. Put 0. Next digit, 1.

1 is equal to 1 so we subtract one and now we have 0. Put a 1.

In the end, we get 00111001.______________________________________

For a letter it's almost the same thing:

If it is an upper-case letter, then you start with 010. If it is lowercase, then start with 011.

Then you just determine the other 5 digits based on the position of the letter in the alphabet. These 5 digits would represent 16, 8, 4, 2, and 1.

There is no 128, 64, and 32 because those 3 values were in the first 3 digits, which we eliminated.

If the letter was "a", which is the 1st letter in the alphabet and a vowel, then we would start with 011. Then we would keep comparing 1 with values and putting 0s, until we got to the last digit, and finally put a 1. The result would be 01100001.

______________________________________

I hope I helped. Good luck.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Consider the following binary value:

10110101

First, number the columns from right-to-left using a zero-based index:

76543210

10110101

Now multiply the binary digit by 2 to the power of the index. Working left to right, we get:

1 * 7^2 = 128

0 * 6^2 = 0

1 * 5^2 = 32

1 * 4^2 = 16

0 * 3^2 = 0

1 * 2^2 = 4

0 * 1^2 = 0

1 * 0^2 = 1

Note that 0 to the power of anything is always 1.

Finally, add all the values together:

128 + 32 + 16 + 4 + 1 = 181

Therefore 10110101 is 181 decimal.

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

Think of it like this we have a number line going up in doubles from 1 all the way up to 128

1>2>4>8>16>32>64>128

Let's say you wanted to work out the letter capital E

E = 69 (This is because capitals start from 65 - 90. 65 being capital A and 90 being capital Z)

Note that if you wanted to do small letter a - z it goes from 97 -122. 97 being small a and 122 being small z.

E = 69 because if,

A=65

B=66

C=67

D=68

E must equal to 69

Now lets work out what a capital E is in binary:

1. you always start from the largest number (This being 128)

2. Remember that E = 69

3. Look at the number line to help you from getting confused

Number line:

-----------------------------------------------------------------------------------------------------

128>>>>>64>>>>>32>>>>>16>>>>>8>>>>>4>>>>>2>>>>>1

>0>>>>>>1>>>>>>0>>>>>>0>>>>>>0>>>>>1>>>>>>0>>>>1

-----------------------------------------------------------------------------------------------------

So, how many times does 128 go into 69? 0 times right? so 0.

0>

How many times does 64 go into 69? 1 time right. so 1.

0>1

How many times does 69 go into 32? twice right? but uh oh! that's not good binary doesn't use 2! so what you must do is get 69 which = E so 69 take away your previous number on top of the number line this being 64.

69 - 64 = 5

which leaves you with 5! how many times does 32 go into 5? 0 times so you put 0 below.

0>1>0

How many times does 16 go into 5? 0 times!

0>1>0>0

How many times does 8 go into 5? 0 times!

0>1>0>0>0

How many times does 4 go into 5? 1 time so put 1 below.

0>1>0>0>0>1

How many times does 2 go into 5? 2 times... that's not right! so do the same as before look at the number before on top of the line which is 4. Take 4 from 5

4 - 5 = 1

how many times does 2 go into 1? 0 times!

0>1>0>0>0>1>0

How many times does 1 go into 1? 1 time!

0>1>0>0>0>1>0>1

E = 01000101

After you know all the letters you can write messages!

01001000011001010110110001101100011011110010000001010101011100110110010101110010

= Hello User

010010000110010101101100011011000110111101010101011100110110010101110010

= HelloUser

How do I do a space?

A space = 00100000

(Decimal 32, hex 20)

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

using the for loop.

the binary number is kept in an array,and the array is multiplied with multiples of 2.

and a constant is named and the valu is stored in it.

and we can convert a real number into an ascii terms.............

This answer is:
User Avatar

User Avatar

Wiki User

16y ago

Check out: http://www.tekmom.com/buzzwords/binaryalphabet.html

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

You read binary code by translating it to ASCII text. Usually, computers convert binary encoded information to ASCII, Decimal code and other human-friendly forms before outputting it.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

For binary numbers, you have 1, 10, 11, 100, 101, 110, 111, and 1000 whereas for decimal numbers you have 1, 2, 3, 4, 5, 6, 7, and 8.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you work out binary codes?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Do binary codes uses 1 and 2?

binary codes uses 0 and 1


Both computer instructions and memory address are represented by?

Binary Codes


What is the difference between binary codes and bcd codes?

In BCD each digit of a decimal number is coded as a separate 4 bit binary number between 0 and 9.For example:Decimal 12 in BCD is shown as 0001 0010 (Binary 1 and Binary 2), in Binary it is 1100.


How many bytes are in a binary code?

There is no real answer to this. Binary codes can be any length. The minimum length is 1 byte.


What are weighted binary codes?

It is that type of binary code where weights are assigned to each symbol position in the code word.


What instructions carry out a task on the computer?

The binary codes in the registry.


What are different types of binary code?

BCD codes,gray code,error detecting code,ASCII character code,Excess 3 code


What kind of data is in the form of numbers?

binary codes or a number chart


What is the purpose of binary codes?

A Binary code is a way of representing text or computer processor instructions by the use of the binary number system's two-binary digits 0 and 1.So the purpose of binary code is to issue human readable code, changed to machine code (binary) that the computer understands and can execute the instructions.


What are Reflected codes?

a modified binary code in which sequential binary numbers are represented by expressions that differ only in one bit, to minimize errors.


What are the codes in a computer called?

the 0's and 1's are called binary.


How many different binary codes can be represented in 2 bits?

2