উইকিশৈশব:এটা কীভাবে কাজ করে/দ্বিমিক সংখ্যা: সংশোধিত সংস্করণের মধ্যে পার্থক্য

বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
পাতা তৈরি
 
অনুবাদ
১ নং লাইন:
==== দ্বিমিক সংখ্যা (বাইনারি ডিজিট) কি? ====
{{কাজ চলছে}}
বেশির ভাগ মানুষই যেকোনো সংখ্যা লিখতে ''দশটি ভিন্ন সংখ্যা''' ব্যবহার করে — ০ থেকে ৯। উদাহরণস্বরূপ, ১৫, ৯৬৭৮৩০, ১০০, ৯৯, ৬ এবং আরও অনেক কিছু।
==== What is Binary? ====
Most people use '''ten different digits''' — 0 to 9 — to write any number. For example, 15, 987630, 100, 99, 6 and so on.
 
একে বলা হয় '''দশমিক''' সংখ্যা পদ্ধতি বা '''ভিত্তি দশ''', যার মানে হল এই সংখ্যা পদ্ধতিতে একটি সংখ্যা গঠনের জন্য '''দশ'''টি বিভিন্ন সংখ্যা রয়েছে, মানুষের (বেশিরভাগ) হাতে যতগুলি আঙ্গুল থাকে।
This is called the '''decimal''' number system or '''base ten''', which means that this number system has '''ten''' different digits to construct a number, as many as (most) people have fingers.
 
কিন্তু কম্পিউটারগুলি দশমিক সংখ্যা পদ্ধতিতে নির্মিত হয় না। এর কারণ হল কম্পিউটার ইলেকট্রনিক বর্তনী (সার্কিট) দিয়ে তৈরি হয়, যার প্রতিটি অংশ হয় চালু থাকে নাহলে বন্ধ থাকে। যেহেতু সেখানে শুধুমাত্র দুটি বিকল্প আছে, তারা শুধুমাত্র '''দুটি ভিন্ন সংখ্যা''', '''০''' এবং '''১''' কে প্রকাশ করতে পারে। একে বলা হয় '''দ্বিমিক''' (বাইনারি) সংখ্যা (ডিজিট) পদ্ধতি, বা '''ভিত্তি দুই'''। ("দ্বি" মানে দুই।) সমস্ত সংখ্যাই এই দুটি সংখ্যা '''০''' এবং '''১''' দিয়ে তৈরি করা হয়। দ্বিমিকে একটি সংখ্যাকে (এটি একটি ০ বা একটি ১) একটি '''বিট''' ও বলা হয় – বাইনারি থেকে '''বি''' এবং ডিজিট থেকে '''ট''' এসেছে।
But computers are not built with the decimal number system. This is because computers are built with electronic circuits, each part of which can be either on or off. As there are only two options, they can only represent '''two different digits''', '''0''' and '''1'''. This is called the '''binary''' number system, or '''base two'''. ("Bi" means two.) All the numbers are constructed from the two digits '''0''' and '''1'''. A digit in binary (that's a 0 or a 1) is also called a '''bit''' – short for '''bi'''nary digi'''t'''.
 
কম্পিউটারগুলি তাদের অন্যান্য সমস্ত গণিত করতে এবং তথ্যগুলিকে যোগ, বিয়োগ, গুণ, এবং ভাগ করতে এই সংখ্যা পদ্ধতি ব্যবহার করে। এমনকি তারা বিট আকারে তথ্য সংরক্ষণও করে।
Computers use this number system to add, subtract, multiply, divide and do all their other math and data. They even save data in the form of bits.
 
একটি বিট বলতে শুধুমাত্র একটি শূন্য বা একটি এক হতে পারে, তাই বড় সংখ্যা বোঝাতে (এবং এমনকি অক্ষরও বোঝাতে) তারা এক একটি খণ্ডে একত্রে দলবদ্ধ হয়ে থাকে। আটটি বিট দিয়ে একটি '''বাইট''' তৈরি হয়, এবং কম্পিউটারগুলি যতগুলি বাইট তাদের প্রয়োজন ততগুলি ব্যবহার করে, আমাদের যা প্রয়োজন তা সঞ্চয় করার জন্য। আধুনিক কম্পিউটার বহু বিলিয়ন বাইট সঞ্চয় করে রাখতে পারে।
A bit by itself can only mean zero or one, so to represent bigger numbers (and even represent letters) they group them together into chunks. Eight bits make a '''byte''', and computers use as many bytes as they need to store what we need them to. Modern computers have many billions of bytes of storage.
 
এই বইটি তোমাকে শেখাবে কিভাবে দ্বিমিক কাজ করে, কেন কম্পিউটার এটি ব্যবহার করে এবং তারা কিভাবে এটি ব্যবহার করে।
This book will teach you how binary works, why computers use it, and how they use it.
 
==== কেন আমরা দ্বিমিক ব্যবহার করি? ====
==== Why do we use Binary? ====
সাধারণ গণিতে, আমরা দ্বিমিক ব্যবহার করি না। আমাদের স্বাভাবিক সংখ্যা পদ্ধতি ব্যবহার করতে শেখানো হয়েছিল। সাধারণ সংখ্যার তুলনায় দ্বিমিক গণিত করা অনেক সহজ কারণ দশ সংখ্যার-চিহ্ন — ০, ১, ২, ৩, ৪, ৫, ৬, ৭, ৮, এবং ৯, পরিবর্তে তুমি শুধুমাত্র দুটি সংখ্যা ব্যবহার করছো-চিহ্ন — ১ এবং ০।
In normal math, we don't use binary. We were taught to use our normal number system. Binary is much easier to do math in than normal numbers because you only are using two number-symbols — 1 and 0 instead of ten number-symbols — 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
 
মাত্র দুটি সংখ্যা-চিহ্ন দিয়ে, তুমি "চালু" বা "বন্ধ", "হ্যাঁ" বা "না" এমন জিনিসগুলি ব্যবহার করে অনেক দূর গণনা করতে পারো। উদাহরণ স্বরূপ: তুমি তোমার আঙুল দিয়ে কতদূর গুনতে পারবে? বেশীরভাগ লোকই বলবে ১০। তুমি যদি দ্বিমিক দিয়ে তোমার আঙ্গুলে গণনা করো তবে তুমি এক হাতে ৩১ গণনা করতে পারবে! দুই হাত দিয়ে, দ্বিমিক ব্যবহার করে, তুমি ১০২৩ পর্যন্ত গণনা করতে পারো!
With just two number-symbols, you can count quite high using things that just go "on" or "off", "yes" or "no". For example: How high can you count with your fingers? Most people would say 10. If you count on your fingers with binary you can count to 31 with one hand! With two hands, using binary, you can count up to 1023!
 
কম্পিউটারগুলি দ্বিমিক ব্যবহার করে কারণ তারা শুধুমাত্র চালু বা বন্ধ অবস্থা পড়তে এবং সংরক্ষণ করতে পারে। সুতরাং, ০ কে "বন্ধ" হিসেবে এবং ১ কে "চালু" হিসেবে ব্যবহার করে আমরা বৈদ্যুতিক তার ব্যবস্থার মধ্যেই সংখ্যা ব্যবহার করতে পারি। এই হিসাবে এটা চিন্তা করো — যদি তোমার প্রতিটি গণিত প্রতীকের (০ থেকে ৯) জন্য একটি করে রঙ থাকে, তোমার দশটি রঙ লাগবে। মনে রাখার পক্ষে এতগুলি রঙ অনেক বেশি, কিন্তু তুমি যেভাবেই হোক এটি করেছো। যদি তুমি শুধুমাত্র কালো এবং সাদা রঙের মধ্যে সীমাবদ্ধ থাকো, তোমার কাছে শুধুমাত্র দুটি রং থাকবে। এটা মনে রাখা অনেক সহজ হবে, কিন্তু তোমাকে সংখ্যা লেখার একটি নতুন উপায় তৈরি করতে হবে। দ্বিমিক হল সেটাই — সংখ্যা নথিবদ্ধ করার এবং ব্যবহার করার একটি নতুন উপায় যা সত্য।
Computers use binary because they can only read and store an on or off charge. So, using 0 as "off" and 1 as "on," we can use numbers in electrical wiring. Think of it as this — if you had one color for every math symbol (0 to 9), you'd have ten colors. That's a lot of colors to memorize, but you have done it anyway. If you were limited to only black and white, you'd only have two colors. It would be so much easier to memorize, but you would need to make a new way of writing down numbers. Binary is just that — a new way to record and use numbers which is true.
 
==== Binaryদ্বিমিক Notationপ্রতীক ====
স্কুলে, তুমি শিখেছিলে যে আমাদের একক, দশক, শতকের ঘর এবং আরও অনেক কিছু আছে। প্রতিটি ঘর পরেরটির চেয়ে দশগুণ বেশি। তুমি যদি এটি আগে না দেখে থাকো তবে দেখো এই ঘরের ধারণাটি এইরকম দেখাচ্ছে:
In school, you were taught that we have a ones, tens, hundreds columns and so on. Each column is worth ten times more than the next one. If you haven't seen it before, this columns idea looks like this:
 
{| class="wikitable" style="text-align:right"
|-
! Decimalদশমিকের columnঘর !! 10১০,000০০০ || 1000১০০০ || 100১০০ || 10১০ || 1
|-
! সংখ্যা
! Digit
| 5 || 4 || 9 || 3 || 6
|-
! মান
! Value
| 5 × 10১০,000০০০ || 4 × 1000১০০০ || 9 × 100১০০ || 3 × 10১০ || 6 × 1
|}
 
সুতরাং দশমিক সংখ্যা ৫৪,৯৩৬ হল ৫×১০০০০ + ৪×১০০০ + ৯×১০০ + ৩×১০ + ৬×১ এর সমান।
So the decimal number 54,936 is equal to 5×10000 + 4×1000 + 9×100 + 3×10 + 6×1.
দ্বিমিকেও এইরকম ঘর আছে, কিন্তু দশ দিয়ে গুণ করার পরিবর্তে, তারা প্রতিবার দুই দিয়ে গুণ করে:
 
Binary also has columns, but instead of multiplying by ten, they multiply by two each time:
 
{| class="wikitable" style="text-align:right"
|-
! Binaryদ্বিমিক columnঘর || 128১২৮ || 64৬৪ || 32৩২ || 16১৬ || 8 || 4|| 2 || 1
|-
! বিট
! Bit
| 1 || 0 || 1 || 1 || 0 || 1 || 0 || 1
|-
! মান
! Value
| 1 × 128১২৮ || 0 × 128৬৪ || 1 × 32৩২ || 1 × 16১৬ || 0 × 8 || 1 × 4 || 0 × 2 || 1 × 1
|}
 
সুতরাং দ্বিমিক সংখ্যা ১০১১০১০১ = ১×১২৮ + ১×৩২ + ১×১৬ + ১×৪ + ১×১ = ১৮১ দশমিক সংখ্যায়।
So the binary number 10110101 = 1×128 + 1×32 + 1×16 + 1×4 + 1×1 = 181 in decimal.
 
এই পদ্ধতিতে আমাদের দ্বিমিক সংখ্যা পড়া যায়, কিন্তু কিভাবে আমরা তাদের লিখব? একটি উপায় হল এক থেকে শুরু করে ওপরের দিকে যাওয়া সমস্ত সংখ্যার একটি তালিকা লেখা। ঠিক যেমন দশমিকে ৯ এর সঙ্গে ১ যোগ করলে ১০ হয়, আর ১ + ৯৯ করলে ১০০ হয়, দ্বিমিকে যখন তুমি একের সঙ্গে এক যোগ করো, হাতে থাকা এক পরের ঘরে চলে যায়। এটি কিভাবে কাজ করে তা দেখতে এই টেবিল ভালো করে দেখো।
This method lets us read binary numbers, but how do we write them? One way is to write a list of all the numbers starting from one and working upwards. Just as adding 1 to 9 in decimal carries over to make 10, and 1 + 99 makes 100, in binary when you add one to one, carry a one over to the next place on the left. Follow along with this table to see how that works.
 
{| class="wikitable" style="text-align: right"
|-
! ভিত্তি-১০ !! দ্বিমিক
! Base-10 !! Binary
|-
| 1 || 1
|-
| 2|| 10১০
|-
| 3|| 11১১
|-
| 4|| 100১০০
|-
| 5|| 101১০১
|-
| 6|| 110১১০
|-
| 7|| 111১১১
|-
| 8|| 1000১০০০
|-
| 9 || 1001১০০১
|-
| 10১০ || 1010১০১০
|-
| 11১১ || 1011১০১১
|-
| 12১২ || 1100১১০০
|-
| 13১৩ || 1101১১০১
|-
| 14১৪ || 1110১১১০
|-
| 15১৫ || 1111১১১১
|-
| 16১৬ || 10000১০০০০
|}
 
তুমি লক্ষ্য করবে যে মান ১, ২, ৪, ৮, ১৬ এর জন্য শুধুমাত্র একটি এক বিট এবং কিছু শূন্য বিট প্রয়োজন, কারণ সেই মান সহ একটি ঘর রয়েছে এবং আমাদের কেবল সেই ঘরের বিটটিকে একটিতে বসাতে হবে।
You'll notice that the values 1, 2, 4, 8, 16 only need one one bit and some zero bits, because there's a column with that value and we just have to set the bit in that column to one.
 
{| class="wikitable"
|-
! ভিত্তি-১০ সংস্করণ !! দ্বিমিক
! Base-10 version !! Binary
|-
| 1 || 1
|-
| 2 || 10১০
|-
| 4 || 100১০০
|-
| 8 || 1000১০০০
|-
| 16১৬ || 10000১০০০০
|}
 
তুমি দ্বিমিক সংখ্যা লেখার একটি ছাঁদ (প্যাটার্ন) লক্ষ্য করেছো কি? ১ থেকে ১৬ পর্যন্ত টেবিলটি আবার ভালো করে দেখো, যতক্ষণ না তুমি তোমার নিজস্ব উপায়ে বুঝতে পারো দ্বিমিকে এইরকম কেন হল,
Have you noticed a pattern in writing binary numbers? Study the table for 1 to 16 again until you understand why in binary,
:<i>"1 + 1 = 10১০"</i> andএবং <i>"1 + 100১০০ = 101১০১"</i>
in your own way.
 
You've probably got lots of practice reading decimal but none yet reading binary, so it's normal for reading binary to feel quite slow.
 
তুমি দশমিক পদ্ধতি পড়ার প্রচুর অনুশীলন করেছো কিন্তু এখনও দ্বিমিক পড়ার জন্য করনি, তাই দ্বিমিক পড়ার জন্য বেশ ধীর বোধ করা স্বাভাবিক।
=== Translating to Base-10 ===
=== ভিত্তি-১০-এ অনুবাদ ===
 
৫২ এর দ্বিমিক সংখ্যা হল ১১০১০০। তুমি কিভাবে একটি দ্বিমিক সংখ্যা পড়বে?
The binary number for 52 is 110100. How do you read a binary number?
# তুমি এককের ঘর দেখো। যেহেতু এটিতে একটি ০ আছে, এটি মোট সংখ্যায় কিছু যোগ করছে না।
# You look at the ones column. Since it has a 0 in it, you don't add anything to the total.
# তারপর তুমি ২ এর ঘরে দেখো। শূন্য আছে, সুতরাং কিছুই না, তাই আমরা পরবর্তী ঘরে চলে যাই।
# Then you look at the twos column. Nothing, so we move on to the next column.
# ৪ এর ঘরে আমরা একটি এক পেয়েছি, তাই আমরা ৪ যোগ করব।
# We have a 1 in the fours column, so we add 4 to the total (total is 4).
# আট এর ঘরকে ছেড়ে যাবো কারণ এটিতে ০ রয়েছে, ১৬ এর ঘরে আমরা ১ পেয়েছি। তাহলে আগের ৪ এর সঙ্গে ১৬ যোগ করলাম (মোট হল ২০)।
# Skipping the eights column since it has a 0, we have come to a 1 in the sixteens column. We add 16 to the total (total is 20).
# শেষে, বত্রিশ এর ঘরে আমাদের একটি ১ আছে। তাহলে আগের ২০ এর সাথে ৩২ যোগ হল (মোট হল ৫২)।
# Last, we have a 1 in the thirty-twos column. We add this to our total (total is 52).
 
আমাদের হয়ে গেছে! এখন আমরা সর্বমোট ৫২ পেয়েছি। একটি ভিত্তি-২ সংখ্যা পড়ার মূল বিষয় হল প্রতিটি ঘরের মান মোটের সাথে যোগ করা, যদি তাতে একটি ১ থাকে। সর্বমোট পাবার জন্য তোমাকে ভিত্তি-১০ এর মতো গুণ করতে হবে না (ওপরের ভিত্তি-১০ উদাহরণ থেকে দশের ঘরের ৫ এর মতো), এভাবে তুমি তাড়াতাড়ি ভিত্তি-২ সংখ্যা পড়তে পারবে। নিচের টেবিলটিকে দেখা যাক।
We're done! We now have the number 52 as our total. The basics of reading a base-2 number is add each columns value to the total if there is a 1 in it. You don't have to multiply like you do in base-10 to get the total (like the 5 in the tens column from the above base-10 example), which can speed up your reading of base-2 numbers. Let's look at that in a table.
 
{| class="wikitable"
|-
! দ্বিমিক সংখ্যা !! ঘর !! দ্বিমিক সংখ্যার মান
! Binary digit !! Column !! Binary digit's value
|-
| 0 || 1 || 0
|-
| 0 || 2 || 0
|-
| 1 || 4 || 4
|-
| 0 || 8 || 0
|-
| 1 || 16১৬ || 16১৬
|-
| 1 || 32৩২ || 32৩২
|-
| || '''Totalসর্বমোট''' || 52৫২
|}
 
এবার আরেকটা সংখ্যা দেখি।
Now let's look at another number.
 
=== একটি রহস্য সংখ্যা খোঁজা ===
=== Finding a Mystery Number ===
 
দ্বিমিক সংখ্যাটি হল ১০১১১, কিন্তু আমরা জানিনা এটি কি। সংখ্যাটি কী তা জানতে ঘর-পঠন প্রক্রিয়ার মধ্য দিয়ে যাওয়া যাক।
The binary number is 1011, but we don't know what it is. Let's go through the column-reading process to find out what the number is.
# এক এর ঘরে ১ আছে, তাই আমরা মোটের সাথে ১ x ১ যোগ করি (মোট হল ১)।
# The ones column has a 1 in it, so we add 1 x 1 to the total (total is 1).
# দুই এর ঘরে একটি ১ আছে, তাই আমরা মোটের সাথে ১ x ২ যোগ করি (মোট ৩)।
# The twos column has a 1 in it, so we add 1 x 2 to the total (total is 3).
# চার এর ঘরে শূন্য আছে, তাই আমরা ০ x ৪ যোগ করব (মোট এখনো ৩)।
# The fours column has a 0 in it, so we add 0 x 4 to the total (total is still 3).
# আট এর ঘরে একটি ১ আছে, তাই আমরা ১ x ৮ যোগ করব (মোট হল ১১)।
# The eights column has a 1 in it, so we add 1 x 8 to the total (total is 11).
শেষ হয়ে গেছে, তাই এটিই উত্তর হল। উত্তর হল ১১! তোমাদের বার করার জন্য এখানে আরও কিছু সংখ্যা রয়েছে।
We are done, so the total is the answer. The answer is 11! Here are some more numbers for you to work out.
<quiz display=simple>
{
|type="{}"}
101১০১={ 5_2 }
 
{
|type="{}"}
1111১১১১={ 15_2 }
 
{
|type="{}"}
10001১০০০১={ 17_2 }
 
{
|type="{}"}
10100১০১০০={ 20_2 }
 
{
|type="{}"}
101000১০১০০০={ 40_2 }
</quiz>
==== Storingপাঠ্য textসংরক্ষণ ====
কম্পিউটার পাঠ্য সহ সবকিছুই দ্বিমিকে সংরক্ষন করে। এটি করার জন্য, প্রতিটি অক্ষর, প্রতিটি বিরামচিহ্ন, প্রকৃতপক্ষে অনেক সংখ্যক প্রতীক যা মানুষ ব্যবহার করেছে, ইউনিকোড নামে একটি পদ্ধতিতে তাদের নিজস্ব সংখ্যা দেওয়া হয়েছে।
Computers store everything in binary, including text. To do this, every letter, every punctuation character, in fact a very large number of the symbols people have ever used, has been given its own number in a system called Unicode.
 
For example, if your name is "George" then the computer can store that in binary just by storing the number for "G", then for "e", and so on. The most common symbols in American English, like letters without accents, can be stored with just one byte. Other symbols, like "£" and "¿", need more than one byte as they've been given a bigger number. A few examples:
* G is stored as 71, which is "0100 0111" in binary
* e is stored as a hundred and one<!-- Writing 101 would be confusing! -->, which is "0110 0101" in binary.
 
উদাহরণস্বরূপ, যদি তোমার নাম হয় "রজত" তাহলে কম্পিউটার এটিকে দ্বিমিকে সংরক্ষণ করতে পারে শুধুমাত্র "র" এর জন্য একটি দ্বিমিক, তারপর "জ" এর জন্য এবং এইভাবে পরপর। আমেরিকান ইংরেজিতে সবচেয়ে সাধারণ চিহ্নগুলি, যেমন উচ্চারণবিহীন অক্ষর, শুধুমাত্র একটি বাইট দিয়ে সংরক্ষণ করা যেতে পারে। অন্যান্য চিহ্ন, যেমন "£" এবং "¿", এদের একের বেশি বাইট প্রয়োজন কারণ তাদের একটি বড় সংখ্যা দেওয়া হয়েছে। কয়েকটি উদাহরণ:
The whole word "George" looks like:
* G সংরক্ষণ হবে ৭১, যেটি দ্বিমিকে হল "০১০০ ০১১১"।
0100 0111 0110 0101 0110 1111 0111 0010 0110 0111 0110 0101
* e সংরক্ষণ হবে একশো এক<!-- Writing 101 would be confusing! -->, যেটি দ্বিমিকে "০১১০ ০১০১"।
 
একটি পুরো কথা "George" এইরকম দেখাবে:
While this might look like gibberish, see if you can find the rest of the letters in that and what their decimal representation is!
০১০০ ০১১১ ০১১০ ০১০১ ০১১০ ১১১১ ০১১১ ০০১০ ০১১০ ০১১১ ০১১০ ০১০১
 
যদিও এটি অর্থহীন কথা লাগতে পারে, চেষ্টা করে দেখ তুমি ইংরেজির বাকি অক্ষরগুলির দ্বিমিক খুঁজে পাও কিনা এবং তাদের দশমিক সংখ্যায় মান কি!
=== Bits and Bytes ===
A bit defines a binary (dual) state (On or Off, 0 or 1, True or False) which can not be broken into more smaller units. The name is short for binary digit, like the '1' in the binary number '10' (representing decimal '2') in a similar fashion to how a decimal digit (number that can have 10 distinct values in the default decimal base reference) work, for instance the '9' and '8' that are part of the '98' decimal number.
 
=== বিট এবং বাইট ===
A byte is eight bits put together or a group of 8 bits. Why eight? It has to do with remembering letters, which you shall read later.
একটি বিট একটি দ্বিমিক (দ্বৈত) অবস্থাকে সংজ্ঞায়িত করে (চালু বা বন্ধ, ০ ​​বা ১, সত্য বা মিথ্যা) এদের আর কোন ছোট এককে ভাঙা যাবেনা। নামটি বাইনারি ডিজিটের ছোট রূপ, যেমন দ্বিমিক সংখ্যা '১০' (দশমিকের '২'কে বোঝায়) এ '১' সংখ্যাটি, যেভাবে একটি দশমিক সংখ্যা (পূর্বনির্বাচিত দশমিক ভিত্তি প্রসঙ্গে ১০টি স্বতন্ত্র মান থাকতে পারে এমন সংখ্যা) কাজ করে, উদাহরণস্বরূপ '৯' এবং '৮' হল '৯৮' দশমিক সংখ্যার অংশ।
একটি বাইট হল আট বিট বা ৮ বিটের একটি দল। আট কেন? এটি অক্ষর মনে রাখার সাথে সম্পর্কিত, যা তুমি পরে পড়বে।