본문 바로가기
나머지

1. MSB ( Most Significant Bit ) , LSB ( Least Significant Bit ) 를 설명하라.

by 무늬만학생 2012. 1. 7.
반응형

       기술면접 @ 양재시스템     2012년 1월 4일(수)

1. MSB ( Most Significant Bit ) , LSB ( Least Significant Bit ) 를 설명하라.

MSB - Most Significanct Bit (가장 큰 비트 자릿수)
LSB - Least Significant Bit (가장 작은 비트 자릿수)

십진수 12는 이진수 '1100'이라는 이진숫자로 표현되는데, 가장 왼쪽에 나오는 1이라는 비트가 MSB가 됩니다. 반대로 가장 오른쪽에 나오는 비트 0은 LSB가 됩니다.


                        1      1      0       0
                      MSB                 LSB

리틀 엔디안식으로 표현하자면 아래와 같이 위치가 변합니다.

                        0      0      1       1
                      LSB                  MSB


컴퓨터 메모리는 각자 주소를 가지고 있습니다. 우리가 쓰는 IBM PC는 바이트단위로 주소를 할당하는데, 컴퓨터에 따라서는 바이트 단위가 아닌 워드단위(16비트)이상으로 주소를 할당하기도 합니다. 편의적으로 위의 그림에서 왼쪽이 주소가 낮은 쪽, 오른쪽이 주소가 높은 쪽이라고 생각해 봅시다. 그럼 다음과 같은 엔디안의 정의가 가능해집니다.

리틀엔디안 - LSB가 낮은 쪽의 주소에 먼저 등장하는 경우의 비트열

빅엔디안 - MSB가 낮은 쪽의 주소에 먼저 등장하는 경우의 비트열

출처 :   http://sshoking.tistory.com/175



In computing, the most significant bit (msb, also called the high-order bit) is the bit position in a binary number having the greatest value. The msb is sometimes referred to as the left-most bit due to the convention in positional notation of writing more significant digits further to the left.

The msb can also correspond to the sign of a signed binary number in one or two's complement notation. "1" meaning negative and "0" meaning positive.

It is common to assign each bit a position number, ranging from zero to N-1, where N is the number of bits in the binary representation used. Normally, this is simply the exponent for the corresponding bit weight in base-2 (such as in 231..20). Although a few CPU manufacturers assign bit numbers the opposite way (which is not the same as different endianness), the msb unambiguously remain the most significant bit. This may be one of the reasons why the term msb is often used instead of a bit number, although the primary reason is probably that different number representations use different numbers of bits.

By extension, the most significant bits (plural) are the bits closest to, and including, the msb.

 
출처:http://en.wikipedia.org/wiki/Most_significant_bit


출처 : http://www.national.com/AU/design/courses/121/bit04/01bit04.htm
반응형

'나머지' 카테고리의 다른 글

4. stack과 heap에 대하여 설명하라(기술면접)  (0) 2012.01.16
PCL이란? @ HP PRINT DRIVER  (0) 2012.01.12
소스관리  (1) 2012.01.11
12(1). 리눅스에서 커널이란?  (0) 2012.01.07
기술면접  (0) 2012.01.07