Assalamualaikum....dan Salam Sejahtera...

Terima kasih kerana melayari blog ini.. Blog ini wujud atas dasar ingin membantu pelajar-pelajar mendapatkan nota tambahan bagi modul ETE 315 @ Asas Sistem Berdigit. Di harapkan pelajar lebih memahami berkaitan modul ini selain daripada pnp di dalam kelas...

Mohon maaf sekiranya terdapat banyak kekurangan di dalam blog ini.. Sebarang kesalahan harap diberitahu untuk diperbetulkan...
Showing posts with label BAB 1. Show all posts
Showing posts with label BAB 1. Show all posts

27 Feb 2010

Binary Addition 2

Hai.. this is extra notes from notes before. You can use this note for you extra knowledge...

Before we calculate the binary number . Let's first take a look at decimal addition.
As an example we have : 26 plus 36,

    26
  +36         
 

To add these two numbers, we first consider the "ones" column and calculate 6 plus 6, which results in 12. Since 12 is greater than 9 (remembering that base 10 operates with digits 0-9), we "carry" the 1 from the "ones" column to the "tens column" and leave the 2 in the "ones" column.

Considering the "tens" column, we calculate 1 + (2 + 3), which results in 6. Since 6 is less than 9, there is nothing to "carry" and we leave 6 in the "tens" column.

    26
  +36
    62

Binary addition

Binary addition works in the same way, except that only 0's and 1's can be used, instead of the whole spectrum of 0-9. This actually makes binary addition much simpler than decimal addition, as we only need to remember the following:
         0 + 0 = 0
         0 + 1 = 1
         1 + 0 = 1
         1 + 1 = 10

As an example of binary addition we have,
              101
            +101                    


a) To add these two numbers, we first consider the "ones" column and calculate 1 + 1, which (in binary) results in 10. We "carry" the 1 to the "tens" column, and the leave the 0 in the "ones" column.

b) Moving on to the "tens" column, we calculate 1 + (0 + 0), which gives 1. Nothing "carries" to the "hundreds" column, and we leave the 1 in the "tens" column.

c) Moving on to the "hundreds" column, we calculate 1 + 1, which gives 10. We "carry" the 1 to the "thousands" column, leaving the 0 in the "hundreds" column.
          101
        +101
        1010

Another example of binary addition:
         1011
       +1011
       10110

Note that in the "tens" column, we have 1 + (1 + 1), where the first 1 is "carried" from the "ones" column. Recall that in binary,

        1 + 1 + 1 = 10 + 1
                        = 11

Binary subtraction

Binary Subtraction  is simplified as well, as long as we remember how subtraction and the base 2 number system. Let's first look at an easy example.  
            111
           - 10
            101

Note that the difference is the same if this was decimal subtraction. Also similar to decimal subtraction is the concept of "borrowing." Watch as "borrowing" occurs when a larger digit, say 8, is subtracted from a smaller digit, say 5, as shown below in decimal subtraction.

          35
        -   8
          27

For 10 minus 1, 1 is borrowed from the "tens" column for use in the "ones" column, leaving the "tens" column with only 2. The following examples show "borrowing" in binary subtraction.

          10            100        1010
         -  1           - 10        - 110
            1              10          100





Exercises

1. 101 + 11 =
2. 111 + 111 =
3. 1010 + 1010 =
4. 11101 + 1010 =
5. 11111 + 11111 =
6. 110 - 10 =
7. 101 - 11 =
8. 1001 - 11 =
9. 1101 - 11 =
10. 10001 - 100 =

25 Feb 2010

Tutorial

Tutorial... Sila buat untuk menambah kepahaman anda....



1. Nyatakan tiga nombor dalam asas dua selepas setiap nombor berikut.

(a) 102

(b) 1102
 
2. Nyatakan nilai tempat bagi digit yang bergaris.

(a) 11002

(b) 1001102
 
3. Cerakinkan setiap nombor berikut mengikut nilai tempat digit-digitnya.

(a) 1112

(b) 11002

(c) 1001102
 
4. Tukarkan setiap nombor berikut dalam asas 10.

(a) 11012

(b) 10001102

(c) 110002
 
5. Ungkapkan nombor asas 10 berikut kepada nombor asas dua.

(a) 5

(b) 35


Jawapan Latihan

1.
2.
3.
4.
5.


20 Aug 2009

Binary Arithmetic

Rules of Binary Addition

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 0, and carry 1 to the next more significant bit
For example,
00011010 + 00001100 = 00100110                  1  1  carries
  0  0  0  1  1  0  1  0    =   26(base 10)
+ 0  0  0  0  1  1  0  0
   =   12(base 10)
  0  0  1  0  0  1  1  0    =   38(base 10)

 
00010011 + 00111110 = 01010001           1  1  1  1  1  carries
  0  0  0  1  0  0  1  1    =   19(base 10)
+ 0  0  1  1  1  1  1  0
   =   62(base 10)
  0  1  0  1  0  0  0  1    =   81(base 10)
Note:  The rules of binary addition (without carries) are the same as the truths of the XOR gate.

Rules of Binary Subtraction

  • 0 - 0 = 0
  • 0 - 1 = 1, and borrow 1 from the next more significant bit
  • 1 - 0 = 1
  • 1 - 1 = 0
For example,
00100101 - 00010001 = 00010100                  0  borrows
  0  0  1 10  0  1  0  1    =   37(base 10)
- 0  0  0  1  0  0  0  1
   =   17(base 10)
  0  0  0  1  0  1  0  0    =   20(base 10)

 
00110011 - 00010110 = 00011101              0 10  1  borrows
  0  0  1  1  0 10  1  1    =   51(base 10)
- 0  0  0  1  0  1  1  0
   =   22(base 10)
  0  0  0  1  1  1  0  1    =   29(base 10)

20 Jun 2009

Sistem Nombor

ASAS NOMBOR

  • Terdapat pelbagai system nombor yang digunakan dalam kehidupan seharian.
  • Sistem yang lazim digunakan ialah sistem nombor perpuluhan.
  • Walaupun sistem ini mudah tetapi tidak sesuai untuk diproses secara elektronik.
  • Sistem nombor perduaan ialah sistem yang sesuai dan lazim digunakan.
  • Sistem nombor perduaan menggunakan beberapa aras seperti 0 dan 1 atau ‘OFF’ dan ‘ON’ atau LOW dan HIGH atau tinggi atau rendah.
  
Jenis-jenis Sistem Nombor:-
  1. Decimal (asas 10)
  2. Binary (asas 2)
  3. Octal (asas 8)
  4. Hexadecimal (asas 16)
 


Nombor Perpuluhan (decimal)

Terdiri daripada 10 angka iaitu 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Ia merupakan nombor ‘Asas 10’.

Salah satu contoh dalam sistem nombor perpuluhan adalah 1428 atau 142810 .



Secara pernyataan matematik:-

       142810   = 1 x 103 + 4 x 102 + 2 x 101+ 8 x 100
                     = 1000 + 400 + 20 + 8

                    =  1428

Nombor Perduaan (binary)


Terdiri daripada 2 angka iaitu 0 dan 1
Ia merupakan nombor ‘Asas 2’.
Salah satu contoh dalam sistem nombor perduaan adalah 101 atau 1012 .

Secara pernyataan matematik:-
     1012     = 1 x 20 + 0 x 21 + 1 x 22  
                 = 1 + 0 + 4
                 = 5  

Nombor Perlapan (oktal)

Terdiri daripada 8 angka iaitu 0, 1, 2 , 3, 4, 5, 6, dan 7.

Ia merupakan nombor ‘Asas 8’.


Nombor Perenambelas (heksadesimal)


Terdiri daripada 16 angka iaitu 0, 1, 2 , 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, dan F.

Ia merupakan nombor ‘Asas 16’
  


PENUKARAN SISTEM NOMBOR










Penukaran Binary kepada Decimal
  
 1012  =  1 x 22 +  0 x 21 + 1 x 20

            =     4     +     0      +   1

            =      5

Penukaran Decimal kepada Binary

   
1810          = _______ 2


  Berhenti apabila N = 0

  1810          = 100102
 

Latihan


1. Tukarkan nombor Decimal kepada Binary,

a) 3310                       b) 7810

c) 10110                     d) 80010

e) 15010                     f)  4910

2. Tukarkan nombor Binary kepada Decimal,

a) 11012                    b) 1000012

c) 10101102              d) 00110102

e) 10111012              f)  1111102
 
 
Penukaran Oktal kepada Decimal
   
1878  =  1 x 82 +  8 x 81 + 7 x 80
            =     64     +     16    +   7
            =      87
Penukaran Decimal kepada Oktal
  
 80710          =______ 8
  
 Berhenti apabila N = 0
  80710          = 3178

 

Latihan


Tukarkan nombor Oktal kepada Desimal,

a) 338                 b) 678

c) 1018               d) 5008

e) 1508               f)  468

Tukarkan nombor Desimal kepada Oktal,

a) 5610               b) 123410

c) 15310             d) 567010

e) 43710             f)  74310