Skip to content
Snippets Groups Projects
Commit db1c839e authored by 장범진's avatar 장범진
Browse files

Upload New File

parent 30e3501c
Branches
No related tags found
No related merge requests found
bit.py 0 → 100644
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> a&1
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
a&1
NameError: name 'a' is not defined
>>> a=0b1100
>>> a&1
0
>>> a&15
12
>>> 10&15
10
>>> 12&15
12
>>> a|15
15
>>> a|1
13
>>> a^1
13
>>> a^16
28
>>> a^15
3
>>> 0b1100 ^ 0b1111
3
>>> 0b1100 & 0b 1111
SyntaxError: invalid token
>>> 0b1100&0b1111
12
>>> a=255
>>> ~a
-256
>>> #
>>> #보수취하면 음수취하고 -1 해줌
>>>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment