jagomart
digital resources
picture1_Lec10 Item Download 2023-02-02 13-44-02


 131x       Filetype PDF       File size 0.38 MB       Source: www.cse.iitk.ac.in


File: Lec10 Item Download 2023-02-02 13-44-02
programs with loops the for loop esc101 fundamentals of computing nisheeth announcements major quiz 1 this wednesday jan 29 12pm 1pm l 20 don t be late don t be ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
   Programs with Loops: The for 
             Loop)
    ESC101: Fundamentals of Computing
              Nisheeth
   Announcements
    Major Quiz 1 this Wednesday, Jan 29, 12pm-1pm, L-20
    Don’t be late. Don’t be absent
    Must carry your Student ID
    No material allowed except one haA4 sheet of paper
    Answers to be written on question paper itself (just like minor 
     quizzes)
       Have to write name and roll number on both sides of each sheet
       Any sheet missing both details will not be graded
    Carry pencil, eraser, sharpener, pen
       Must write final answers using pen                                 2
               Bitwise Operators (not in Major Quiz 1)
            Operation              C Code            a        b        c        d        e         f
             BITWISE               c = a & b       0000     1111     0000     1111     1111      1111
               AND
             BITWISE               d = a | b       0101     1100     0100     1101     1001      1010
                OR
             BITWISE               e = a ^ b       1010     1110     1010     1110     0100      0101
               XOR
             BITWISE                f = ~a         1001     0111     0001     1111     1110      0110
         COMPLEMENT
                                                                                                 3
                        Bitwise AND Operator &
   • The output of bitwise AND is 1 if the corresponding bits of two 
     operands are both 1. If either bit of an operand is 0, the result of 
     corresponding bit is evaluated to 0
   • In C Programming, bitwise AND operator is denoted by &
           12 = 00001100 (In Binary)          #include 
           25 = 00011001 (In Binary)          int main(){
           Bitwise AND of 12 and 25               int a = 12, b = 25;
              0000 1100                           printf("Output = %d", a & b);
           & 0001 1001
             _________                            return 0;
              0000 1000  = 8 (In decimal)     }
                                                                              4
The words contained in this file might help you see if this file matches what you are looking for:

...Programs with loops the for loop esc fundamentals of computing nisheeth announcements major quiz this wednesday jan pm l don t be late absent must carry your student id no material allowed except one haa sheet paper answers to written on question itself just like minor quizzes have write name and roll number both sides each any missing details will not graded pencil eraser sharpener pen final using bitwise operators in operation c code a b d e f or xor complement operator output is if corresponding bits two operands are either bit an operand result evaluated programming denoted by binary include int main printf return decimal...

no reviews yet
Please Login to review.