일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- c#
- array
- PostgreSQL
- django
- dataframe
- Github
- Java
- numpy
- GIT
- hive
- PANDAS
- Google Spreadsheet
- 파이썬
- google apps script
- Mac
- gas
- Redshift
- Python
- Apache
- Tkinter
- PySpark
- SQL
- math
- Excel
- matplotlib
- Kotlin
- string
- list
- Google Excel
- Today
- Total
목록& (2)
달나라 노트
논리 연산자에 대해 알아봅시다. 논리 연산자라고 하면 and, or, not을 의미합니다. Operator Description Example A && B and A와 B 모두 true여야만 true return A와 B 중 하나라도 false라면 false return true && true -> true true && false -> false false && true -> false false && false -> false || or A와 B 중 하나라도 true라면 true return A와 B 모두 false여야만 false return true && true -> true true && false -> true false && true -> true false && false -> false..
& = 비트 논리곱 | = 비트 논리합 ^ = 비트 상호배제 ~ = 비트 부정 위 4개의 연산자는 모두 2진수 상태에서의 연산을 합니다. 인자로 받은 10진수를 2진수로 변경해서 연산한 후 그 결과를 다시 10진수로 변경해서 return해줍니다. 이제 각 연산자가 어떻게 작동하는지를 알아봅시다. 1. & (비트 논리곱) using System; class MyProgram { public static void Main() { Console.WriteLine(1 & 2); Console.WriteLine(2 & 2); Console.WriteLine(3 & 2); Console.WriteLine(4 & 2); } } -- Result 0 2 2 0 위 코드를 실행하면 각각 0, 2, 2, 0이라는 결과가 ..