예제) 비트 연산자 사용

 

 

 

 

using System;

public class Bitoper

{

  public static void Main(string[] args)

  {

      int i = 10;

     int j = 20;

  int a;

 

  a = i & j; i = i >>3; j = i<<3;

  Console.WriteLine("a={0}, i={1}, j={2}", a,i,j);

  Console.ReadLine();

  }

}  // 실행 결과는?

 

 

 

 

+ Recent posts