Universiteti i Prizrenit UKSHIN HOTI
Përshëndetje vizitor i nderuar,

Forumi uni-prizren është forum i kushtuar studentëve të Universitetit të Prizrenit. Ju nuk jeni i regjistruar ose nuk jeni identifikuar në forum. Ju lutem identifikoheni ose regjistroheni duke klikuar si më poshtë.

Me respekt, stafi i forumit të Universitetit të Prizrenit
Universiteti i Prizrenit UKSHIN HOTI
Përshëndetje vizitor i nderuar,

Forumi uni-prizren është forum i kushtuar studentëve të Universitetit të Prizrenit. Ju nuk jeni i regjistruar ose nuk jeni identifikuar në forum. Ju lutem identifikoheni ose regjistroheni duke klikuar si më poshtë.

Me respekt, stafi i forumit të Universitetit të Prizrenit
Universiteti i Prizrenit UKSHIN HOTI
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Universiteti i Prizrenit UKSHIN HOTI

Viti Akademik 2018-2019
 
ForumForum  PortaliPortali  Events  PublicationsPublications  GalleryGallery  KërkoKërko  Latest imagesLatest images  RegjistrohuRegjistrohu  identifikimiidentifikimi  

 

 Binary Tutorial

Shko poshtë 
AutoriMesazh
vrifaj
Middle-Bachelor
Middle-Bachelor
vrifaj


Numri i postimeve : 120
Pikët : 25178
Reputacioni : 17
Join date : 23/03/2011
Age : 33
Location : C:
Drejtimi : Informatik

Binary Tutorial Empty
MesazhTitulli: Binary Tutorial   Binary Tutorial Icon_minitime20th October 2011, 11:45

1.Intro

Binary works the exact same way decimal does-start from the right.
X * y^position. Except binary can have 0-1 for X and decimal can have 0-10. And, binary uses 2 for y and decimal uses 10
Simple. Anyway, think of the decimal number 11. Ok, read it from right to left and using the method above. X * Y^P. X is the first number when read right to left. So, 1 * Y^P. Y is 10 in decimal. So, 1 * 10^P. P is the position and sense its the first one, the position number is 0. So, you have this --- 1 * 10^0. Remember the order of operations, exponents first. 1 * 1 = 1. Ok, so the first digit is equal to one. Well, you already knew that but it helps you see the number differently. So, we have - 1. We still have to do the next digit number. X * Y^P. Position increases from right to left so its = 1 * 10^1. This is 1 * 10. 10. We add together our findings = 1 + 10 = 11. Very simple. Binary is even simpler. Because, you don't have to increase by 10x; only 2x. Now that you know how numbers work, lets move on to converting binary to decimal.




2.Converting Binary to Decimal

First, get a binary number. I pick 10101. Now, write it vertically.
1
1
0
1

Good. Now, start from the bottom and use X * Y^P.
Remember. Y is 2 in binary.
1 * 2^0 = 1*1=1
0 * 2^1 = 0*2=0
1 * 2^2 = 1*4=4
1 * 2^3 = 1*8=8
Now, add up your findings again. 1+4+8=13.
Walah. 1101 = 13.
Practice on this number.
110001.
I'll write the answer in a spoiler so you can see if you are right.

The answer (Click to View)


It will probably help you greatly to memorize the base 2 thing.
2 4 8 16 32 64 128 256.
This way, you can just associate each one with the digit they belong with and only add them if there is a 1 in that digit and ignore them otherwise.
Like this

16 8 4 2
1 0 0 1
You only add the ones with a one So, it would be like 16+2=18.




3.Converting Decimal to Binary

Now, to convert decimal to binary.
There are two ways to do it and I will be showing the easier of the two.
Write your number.

X
divide by two
X/2
If there is a remainder, write down a 1 if not, write a 0.
(If you have a remainder, round the number down.)
100
50-0
25-0
12.5-1
12
6-0
3-0
1.5-1
1
0.5-1
Your number is 0010011. But, you have to flip it. Then it becomes 1100100.




4.Practice

You can practice with a sheet of paper. I do not recommend doing this with a computer program-text editor because you have to write the first digit first and then the second and if you do that with notepad (or any other text editor on a computer) then it will be backwards. And, if you remember to keep moving to the left before you do your next digit then you will be fine but, you might mess up and get really confused. Anyway, if you need to check your work, then open up the calculator on your computer and hit view>scientific view.
Then type in your decimal number and hit bin.

Binary Tutorial 2090054ed0e02cb73adfae585855519af6d76da
Mbrapsht në krye Shko poshtë
 
Binary Tutorial
Mbrapsht në krye 
Faqja 1 e 1
 Similar topics
-
» [Tutorial] Visual Basic for Beginners [Tutorial]
»  Java Programming Tutorial

Drejtat e ktij Forumit:Ju nuk mund ti përgjigjeni temave të këtij forumi
Universiteti i Prizrenit UKSHIN HOTI :: Drejtimet Bachelor :: TIT-
Kërce tek: