البحث:

انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

# المحاضرة الثالثة

الكلية كلية التربية للعلوم الصرفة     القسم قسم الفيزياء     المرحلة 3
أستاذ المادة انتهاء عبد الله محمد       18/05/2021 10:25:57
2.7 Binary Arithmetic
Binary arithmetic is essential in all types of digital systems. To understand these
systems, you must know the basics of binary addition, subtraction, multiplication,
and division.
The four basic rules for adding binary digits (bits) are as follows:
0 + 0 = 0 Sum of 0 with a carry of 0
0 + 1 = 1 Sum of 1 with a carry of 0
1 + 0 = 1 Sum of 1 with a carry of 0
1 + 1 = 10 Sum of 0 with a carry of 1
Notice that the first three rules result in a single bit and in the fourth rule the
addition of two 1s yields a binary two (10). When binary numbers are added, the
last condition creates a sum of 0 in a given column and a carry of 1 over to the
next column to the left, as illustrated in the following examples:
Example: Add 11 + 1
Sol.
Carry Carry
1 1
0 1 1
+ 0 0 1
1 0 0
In the right column, 1 + 1 = 0 with a carry of 1 to the next column to the left. In
the middle column, 1 + 1 + 0 = 0 with a carry of 1 to the next column to the left.
In the left column, 1 + 0 + 0 = 1.
Carry bits
1 + 0 + 0 = 0 1 Sum of 1 with a carry of 0
1 + 1 + 0 = 1 0 Sum of 0 with a carry of 1
1 + 0 + 1 = 1 0 Sum of 0 with a carry of 1
1 + 1 + 1 = 1 1 Sum of 1 with a carry of 119
18/5/2021
0
Example: Add 111 + 11
Sol.
Carry Carry
1 1
1 1 1
+ 1 1
1 0 1 0
2.7.2 Binary Subtraction
The four basic rules for subtracting bits are as follows:
0 - 0 = 0
1 - 1 = 0
1 - 0 = 1
10 - 1 = 1 0 - 1 with a borrow of 1
When subtracting numbers, you sometimes have to borrow from the next column
to the left. A borrow is required in binary only when you try to subtract a 1 from
a 0. In this case, when a 1 is borrowed from the next column to the left, a 10 is
created in the column being subtracted, and the last of the four basic rules just
listed must be applied.
Example: Subtract 0112 from 1012.
Sol.
Left column: Middle column:
When a 1 is borrowed, Borrow 1 from next column
a 0 is left, so 0 - 0 = 0. to the left, making a 10 in
this column, then 10 - 1 = 1.
1 1 0 1
- 0 1 1
0 1 020
18/5/2021
2.7.3 Binary Multiplication
The four basic rules for multiplying bits are as follows:
0 × 0 = 0, 0 × 1 = 0, 1 × 0 = 0, 1 × 1 = 1
Multiplication is performed with binary numbers in the same manner as with
decimal numbers. It involves forming partial products, shifting each successive
partial product left one place, and then adding all the partial products.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم