한 때 강남스타일이 전세계 적으로 유명했을 때가 있었다.
강남스타일이 인기를 타면서 유튜브에서는 전세계 적으로 수많은 사람들이
강남스타일을 보게 되었다.
그로 인하여 강남 스타일의 조회수는 높아만 졌고, 결국 음수가 되어 버렸다.
왜 이렇게 된 것일까?
일단 우리는 이것을 이해하기 위해 비트라는 개념을 알아야한다.
비트는 2가지를 표현할 수 있는 수단이다.
즉 0과 1로 표현될 수 있다. 구글은 32비트로 조회수를 표시했고, 32비트는 32개의 비트로 이루어져 있다
2비트를 예로 한번 들어보자.
1비트가 2가지의 경우를 가진다면 2비트는 00,01,10,11 네가지
즉, 한자리에 두가지 경우가 올 수 있다. 0과 1.
그래서 2 비트는 2*2 총 =4 가지가 된다. 이런 원리로 32비트는
0부터 -1 (총
그런데 문제는 컴퓨터는 저 끝에 도달해 버리면 오버플로우 라는 현상이 일어난다.
흘러 넘친다는 뜻인데 끝에 도달하면 제일 작은 부분으로 돌아가게 된다 .
(반대로 제일 낮은 부분에 도달하면 가장 큰 부분으로 가게 된다.)
싸이의 강남스타일은
(사실 에러가 아니라고 한다. 이스터 에그라고 하는데 프로그래머들이 장난을 친 것이다.
특정한 조건에 맞춰 쓸데 없는 기능을 추가한 것이다.)
위와 같은 현상은 게임에서도 자주 일어난다.
문명이라는 게임에서 간디가 있다. 간디는 평화주의자에 걸맞게 공격력이 1으로 설정되어 있었다.
간디는 원래 공격력이 1이였는데 공격력이 2가 떨어지면 0보다 적은 수가 되어서 공격력이 255가 되는 버그도 있었다 .
사실상 제일 강해져 버린 것이다.
(8비트로 공격력을 저장했는데, 0~255까지 저장할 수 있었는데 -2가 되면서 음수가 되어 255가 되어버린 것 이다.)
최근에 오버워치라는 0부터 5000점 까지 점수를 매기는 게임이 있었는데 어떤 유저가 1점까지 내린후 더 내려서
5000점에 도달한 유저도 있었다.
다음에는 조금 더 흥미로운 소재로 돌아오도록 하겠습니다 ^^ 감사합니다.
(Gangnam style is popular, and YouTube has a lot of people around the world
I got to see Gangnam style.
As a result, the number of views in Gangnam style was high and eventually became negative.
Why is this happening?
We need to know the notion of bits to understand this.
A bit is a means of expressing two things.
That is, 0 and 1, respectively. Google displayed 32-bit views.
But the problem is that when the computer reaches the end, the phenomenon of overflow occurs.
It means to overflow, and when it reaches the end, it returns to the smallest part.
(Conversely, when you reach the lowest part, you go to the biggest part.)
Psy's Gangnam style It reached top and eventually became negative.
(Actually it is not an error.
It 's an eastern egg.)
The above phenomenon occurs frequently in games.
There is Gandhi in a game called civilization. Gandhi was set to 1 because he is pacifist.
Gandhi originally had a 1 attack power, but if the attack power dropped by 2, it would be less than 0, so there was a bug where the attack power was 255.
It is actually the strongest.
(The game saved the attack power with 8 bits.
It could save it from 0 ~ 255, but it became negative and became negative 255.)
Recently, there was a game that blizzard's Over-watch score from 0 to 5,000 points.
Some users reached 5000 points by using overflow.
Next time, I will return to a more interesting material ^^ Thank you.
(I'm sorry. I'm not good at English... So I can't express my post detail..)