Posted on

Latihan 1 SOD2

  1. FIRST : F SECOND : T THIRD : T

    a. ( FIRST and SECOND ) or THIRD

( F and T ) or T

F or T = T

  1. b. FIRST or ( SECOND and THIRD )

    F      or       ( T and T )

    F       or        T = T

    c. Not FIRST or ( SECOND and Not THIRD )

    T      or       ( T   and     F )

    T     or      F = T

    d. SECOND and ( FIRST or Not THIRD )

    T      and     (   F    or      T )

    T    and     T    =    T

    e. Not ( FIRST and THIRD ) or Not SECOND

    Not ( F and T )   or    F

    Not   F   or   F

    T    or   F   =    T

    f. ( SECOND or THIRD ) and ( Not FIRST or SECOND )

    ( T   or    T )  and  ( T   or   T )

    T   and   T   =   T

g. Not SECOND or ( FIRST and Not THIRD )

F         or   ( F and F )

F    or     F = F

h. ( FIRST and Not THIRD ) or ( SECOND or Not THIRD )

    ( F  and    F )    or   ( T or F )

    F    or    T   =   T

i. ( Not SECOND and FIRST ) or Not THIRD

( F   and   F )   or   F

F   or   F   =   F

j. Not ( Not SECOND and THIRD ) and FIRST

Not     (   F   and   T )   and   F

Not    F   and   F

T   and   F    =   F

2. Jika diketahui :

S1 : “JAKARTA”

S2 : “DEPOK”

S3 : “BEKASI”

a. Length ( S1 ) + Length ( S2 ) = 7 + 5 = 12

b. Length ( Concat ( S2, S3 ))

Length ( “DEPOKBEKASI” ) = 11

c. Substr ( Concat ( S2, S1 ), 4, Length ( S1 ))

Substr ( “DEPOKJAKARTA”, 4, 7 ) = “OKJAKAR”

d. Insert ( S1, Delete ( S3, 1, 3 ), Length ( S3 ))

Insert ( S1, “ASI”, 6 )) = “JAKARASITA”

e. Insert ( S2, Substr ( S3, 2, 3 ) 4 )

Insert ( S2, “EKA”, 4 ) = “DEPEKAOK”

3. Buatlah tabel untuk pemetaan kestorage dari integer jika diketahui N = 5 (Sign dan Magnitude, Two’s Complement dan One’s Complement )

INTEGER SKEMA

SIGN & MAGNITUDE

SKEMA

TWO’S COMPL

SKEMA

ONE’S COMPL

-15 -1111 10001 10000
-14 -1110 10010 10001
-13 -1101 10011 10010
-12 -1100 10100 10011
-11 -1011 10101 10100
-10 -1010 10110 10101
-9 -1001 10111 10110
-8 -1000 11000 10111
-7 -0111 11001 11000
-6 -0110 11010 11001
-5 -0101 11011 11010
-4 -0100 11100 11011
-3 -0011 11101 11100
-2 -0010 11110 11101
-1 -0001 11111 11110
0 0000 00000 00000
1 0001 00001 00001
2 0010 00010 00010
3 0011 00011 00011
4 0100 00100 00100
5 0101 00101 00101
6 0110 00110 00110
7 0111 00111 00111
8 1000 01000 01000
9 1001 01001 01001
10 1010 01010 01010
11 1011 01011 01011
12 1100 01100 01100
13 1101 01101 01101
14 1110 01110 01110
15 1111 01111 01111

    About Nia

    Namaku Nia Fadila Rizki dan aku biasa dipanggil Nia

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s