바이트

컴퓨터의 기억장치의 크기를 나타내는 단위

v  d  e  h
바이트 크기
SI 접두어 전통적 용법 이진 접두어
기호(이름) 기호 기호(이름) V값
kB (킬로바이트) 10001 = 103 KB 10241 = 210 KiB (키비바이트) 210
MB (메가바이트) 10002 = 106 MB 10242 = 220 MiB (메비바이트) 220
GB (기가바이트) 10003 = 109 GB 10243 = 230 GiB (기비바이트) 230
TB (테라바이트) 10004 = 1012 TB 10244 = 240 TiB (테비바이트) 240
PB (페타바이트) 10005 = 1015 PB 10245 = 250 PiB (페비바이트) 250
EB (엑사바이트) 10006 = 1018 EB 10246 = 260 EiB (엑스비바이트) 260
ZB (제타바이트) 10007 = 1021 ZB 10247 = 270 ZiB (제비바이트) 270
YB (요타바이트) 10008 = 1024 YB 10248 = 280 YiB (요비바이트) 280

바이트(byte)는 컴퓨터기억장치의 크기를 나타내는 단위로 자주 쓰이며, 많은 프로그래밍 언어에서 정수형에 속하는 자료형이기도 하다. 바이트의 실질적 의미는 ASCII 문자 하나를 나타낼 수 있다는 것이다. 따라서 여러 바이트를 한 워드로 사용하고 있는 현재에도 대부분의 컴퓨터 하드웨어에서 메모리의 주소 단위로 사용된다.

스토리지 크기가 늘어남에 따라 10진, 2진 해석의 차이가 커진다. 이를 백분율로 비교 차트이다.

역사 편집

"바이트"(byte)라는 용어는 1956년 6월 워너 벅홀츠(Werner Buchholz)가 창안하였는데[1][2][3][a], 당시 IBM 스트레치 컴퓨터의 초기 설계를 하고 있던 시기였으며[4][5][6][2][3][7][8], 비트 및 가변 필드 길이(VFL) 명령을 한 바이트 크기로 인코딩하려던 참이었다.[2] 우연적으로 비트(bit)로 발음되지 않도록 "바이트"(byte)로 철자를 바꾸었다.[6][2][9]

정의 편집

바이트의 정의는 여러 가지가 있으며, 서로 비슷한 뜻을 지니지만 섞어 쓸 경우 혼동을 부를 수도 있다.

  1. 일정한 개수의 비트로 이루어진 연속된 비트열. ‘일정한 개수’가 항상 정해진 건 아니지만, 최근에는 사실상 1바이트를 8비트로 간주하는 경우가 흔하다.
  2. 이진 컴퓨터의 워드 안에서 주소로 표현할 수 있는 가장 작은 단위에 해당하는 연속된 비트열. 예를 들어서 CDC 6000 계열의 메인프레임은 60비트 부동소수점 실수를 6비트짜리 바이트 10개로 나눴으며, 따라서 대문자 로마자와 숫자만을 표현할 수 있는 천공 카드에 결과를 출력하기가 용이했다. 또한 CDC의 경우 12비트 I/O를 사용했기 때문에 12비트를 1바이트라 부르기도 했다. 이 정의 역시 최근에는 대부분 8비트를 가리키지만, 역사적으로 6비트, 7비트, 9비트 등의 바이트가 존재했다.
  3. 직렬 데이터 스트림(예를 들어서 모뎀 등)에서 의미를 가지는 가장 작은 연속된 비트열. 여기에는 시작 비트, 종료 비트, 패리티 비트 등이 포함될 수 있으며, 예를 들어 7비트 ASCII 부호를 저장할 경우 최소 7비트에서 최고 12비트가 한 바이트가 될 수 있다.
  4. 몇몇 프로그래밍 언어자료형. 예를 들어 C의 경우 한 바이트는 실행 환경에서 쓰이는 문자들을 담을 수 있을 만큼 큰 단위(C 표준 3.5항)로 정의되며, 한 바이트를 담는 char 자료형은 부호가 있느냐 없느냐와 상관 없이 적어도 8비트 이상(5.2.4.2.1항)이어야 한다. 자바byte 자료형은 항상 부호가 있으며 8비트로 정의된다.

한 바이트 안의 비트의 개수가 중요할 경우에는 흔히 옥텟(octet)과 같이 크기가 일정한 단위를 쓰기도 하며, 특히 컴퓨터 네트워크전기통신에서 흔히 쓰인다. 또한 프랑스어에서는 옥텟을 바이트의 뜻으로 쓰기도 한다.

기호와 접두어 편집

IEEE 1541에서는 바이트의 기호를 ‘B’로 정했으며 접두어와 함께 많이 사용되지만, IEC 60027-2에서는 여기에 대한 언급이 없다. 또한 B는 유사한 분야에서 쓰이는 의 단위이기도 하다. 비슷하게 IEEE 1541은 비트의 기호를 ‘b’로 정했지만 IEC 60027-2는 bit를 그대로 기호로 쓰고 있다.

바이트보다 더 큰 단위를 나타내기 위해 기호에 접두어를 붙여 쓸 수 있다. 여기에는 기존의 10진법 기준 SI 접두어와 IEC 60027-2에서 정의한 이진 접두어가 공존하고 있는데, SI 접두어 뒤에 ‘i’를 붙이면 비슷한 크기의 이진 접두어가 된다. (예를 들어, 1MB = 1,000,000 바이트 ≒ 1,048,576 바이트 = 1MiB) 하지만 SI 접두어를 이진 접두어의 의미로 사용하는 경우도 흔히 볼 수 있으며 두 기준이 서로 섞이는 경우도 있다. 예를 들어 1.44MB 플로피 디스크의 실제 용량은 1.44MB(= 1,440,000 바이트)나 1.44MiB(= 약 1,509,949 바이트)가 아닌 1440KiB(= 1,474,560 바이트)이다.

바이트는 추상적인 단위이기 때문에 바이트보다 더 작은 단위를 나타내는 접두어는 존재하지 않는다. 다만 비트보다 크고 바이트보다 작은 단위는 몇 개가 있다.

관련 단위 편집

  • 옥텟(octet): 한데 묶여 쓰이는 2진 이진부호모음. 바이트가 8비트를 가리킬 때 서로 같은 뜻을 갖는다. 전기통신 분야에서는 바이트란 용어 대신 옥텟이란 표현을 사용한다. 팔중수라고도 부른다.
  • 니블(nibble) = 1바이트의 절반으로 보통 4비트를 가리킨다. 이때 바이트 하나는 상위 니블(상위 4비트)과 하위 니블(하위 4비트)로 나눌 수 있다.
  • 비트(bit): 비트는 전산학과 정보 이론의 정보 단위이다.
  • 워드(word): 전자통신 기기에 따라 2바이트 또는 4바이트를 묶어서 부르는 단위이다.
  • 킬로바이트(kbyte): 1024 바이트는 1 킬로바이트이다.

같이 보기 편집

각주 편집

  1. Buchholz, Werner (1956년 6월 11일). 〈7. The Shift Matrix〉. 《The Link System》 (PDF). IBM. 5–6쪽. Stretch Memo No. 39G. 2017년 4월 4일에 원본 문서 (PDF)에서 보존된 문서. 2016년 4월 4일에 확인함. […] Most important, from the point of view of editing, will be the ability to handle any characters or digits, from 1 to 6 bits long.
    Figure 2 shows the Shift Matrix to be used to convert a 60-bit word, coming from Memory in parallel, into characters, or 'bytes' as we have called them, to be sent to the Adder serially. The 60 bits are dumped into magnetic cores on six different levels. Thus, if a 1 comes out of position 9, it appears in all six cores underneath. Pulsing any diagonal line will send the six bits stored along that line to the Adder. The Adder may accept all or only some of the bits.
    Assume that it is desired to operate on 4 bit decimal digits, starting at the right. The 0-diagonal is pulsed first, sending out the six bits 0 to 5, of which the Adder accepts only the first four (0–3). Bits 4 and 5 are ignored. Next, the 4 diagonal is pulsed. This sends out bits 4 to 9, of which the last two are again ignored, and so on.
    It is just as easy to use all six bits in alphanumeric work, or to handle bytes of only one bit for logical analysis, or to offset the bytes by any number of bits. All this can be done by pulling the appropriate shift diagonals. An analogous matrix arrangement is used to change from serial to parallel operation at the output of the adder. […]
     
  2. Buchholz, Werner (February 1977). “The Word 'Byte' Comes of Age...”. 《Byte Magazine2 (2): 144. […] The first reference found in the files was contained in an internal memo written in June 1956 during the early days of developing Stretch. A byte was described as consisting of any number of parallel bits from one to six. Thus a byte was assumed to have a length appropriate for the occasion. Its first use was in the context of the input-output equipment of the 1950s, which handled six bits at a time. The possibility of going to 8 bit bytes was considered in August 1956 and incorporated in the design of Stretch shortly thereafter. The first published reference to the term occurred in 1959 in a paper 'Processing Data in Bits and Pieces' by G A Blaauw, F P Brooks Jr and W Buchholz in the IRE Transactions on Electronic Computers, June 1959, page 121. The notions of that paper were elaborated in Chapter 4 of Planning a Computer System (Project Stretch), edited by W Buchholz, McGraw-Hill Book Company (1962). The rationale for coining the term was explained there on page 40 as follows:
    Byte denotes a group of bits used to encode a character, or the number of bits transmitted in parallel to and from input-output units. A term other than character is used here because a given character may be represented in different applications by more than one code, and different codes may use different numbers of bits (ie, different byte sizes). In input-output transmission the grouping of bits may be completely arbitrary and have no relation to actual characters. (The term is coined from bite, but respelled to avoid accidental mutation to bit.)
    System/360 took over many of the Stretch concepts, including the basic byte and word sizes, which are powers of 2. For economy, however, the byte size was fixed at the 8 bit maximum, and addressing at the bit level was replaced by byte addressing. […]
     
  3. “Timeline of the IBM Stretch/Harvest era (1956–1961)”. Computer History Museum. June 1956. 2016년 4월 29일에 원본 문서에서 보존된 문서. 2017년 4월 3일에 확인함. 1956 Summer: Gerrit Blaauw, Fred Brooks, Werner Buchholz, John Cocke and Jim Pomerene join the Stretch team. Lloyd Hunter provides transistor leadership.
    1956 July [sic]: In a report Werner Buchholz lists the advantages of a 64-bit word length for Stretch. It also supports NSA's requirement for 8-bit bytes. Werner's term "Byte" first popularized in this memo.
      (NB. This timeline erroneously specifies the birth date of the term "byte" as July 1956, while Buchholz actually used the term as early as June 1956.)
  4. Buchholz, Werner (1956년 7월 31일). 〈5. Input-Output〉. 《Memory Word Length》 (PDF). IBM. 2쪽. Stretch Memo No. 40. 2017년 4월 4일에 원본 문서 (PDF)에서 보존된 문서. 2016년 4월 4일에 확인함. […] 60 is a multiple of 1, 2, 3, 4, 5, and 6. Hence bytes of length from 1 to 6 bits can be packed efficiently into a 60-bit word without having to split a byte between one word and the next. If longer bytes were needed, 60 bits would, of course, no longer be ideal. With present applications, 1, 4, and 6 bits are the really important cases.
    With 64-bit words, it would often be necessary to make some compromises, such as leaving 4 bits unused in a word when dealing with 6-bit bytes at the input and output. However, the LINK Computer can be equipped to edit out these gaps and to permit handling of bytes which are split between words. […]
     
  5. Buchholz, Werner (1956년 9월 19일). 〈2. Input-Output Byte Size〉. 《Memory Word Length and Indexing》 (PDF). IBM. 1쪽. Stretch Memo No. 45. 2017년 4월 4일에 원본 문서 (PDF)에서 보존된 문서. 2016년 4월 4일에 확인함. […] The maximum input-output byte size for serial operation will now be 8 bits, not counting any error detection and correction bits. Thus, the Exchange will operate on an 8-bit byte basis, and any input-output units with less than 8 bits per byte will leave the remaining bits blank. The resultant gaps can be edited out later by programming […] 
  6. Blaauw, Gerrit Anne; Brooks, Jr., Frederick Phillips; Buchholz, Werner (1962), 〈4: Natural Data Units〉, Buchholz, Werner, 《Planning a Computer System – Project Stretch》 (PDF), McGraw-Hill Book Company, Inc. / The Maple Press Company, York, PA., 39–40쪽, LCCN 61-10466, 2017년 4월 3일에 원본 문서 (PDF)에서 보존된 문서, 2017년 4월 3일에 확인함, […] Terms used here to describe the structure imposed by the machine design, in addition to bit, are listed below.
    Byte denotes a group of bits used to encode a character, or the number of bits transmitted in parallel to and from input-output units. A term other than character is used here because a given character may be represented in different applications by more than one code, and different codes may use different numbers of bits (i.e., different byte sizes). In input-output transmission the grouping of bits may be completely arbitrary and have no relation to actual characters. (The term is coined from bite, but respelled to avoid accidental mutation to bit.)
    A word consists of the number of data bits transmitted in parallel from or to memory in one memory cycle. Word size is thus defined as a structural property of the memory. (The term catena was coined for this purpose by the designers of the Bull GAMMA 60(프랑스어판) computer.)
    Block refers to the number of words transmitted to or from an input-output unit in response to a single input-output instruction. Block size is a structural property of an input-output unit; it may have been fixed by the design or left to be varied by the program. […]
      |quote=에 라인 피드 문자가 있음(위치 1211) (도움말)
  7. Raymond, Eric Steven (2017) [2003]. “byte definition”. 2017년 4월 3일에 원본 문서에서 보존된 문서. 2017년 4월 3일에 확인함. 
  8. Bemer, Robert William (2000년 8월 8일). “Why is a byte 8 bits? Or is it?”. 《Computer History Vignettes》. 2017년 4월 3일에 원본 문서에서 보존된 문서. 2017년 4월 3일에 확인함. […] I came to work for IBM, and saw all the confusion caused by the 64-character limitation. Especially when we started to think about word processing, which would require both upper and lower case. […] I even made a proposal (in view of STRETCH, the very first computer I know of with an 8-bit byte) that would extend the number of punch card character codes to 256 […]. So some folks started thinking about 7-bit characters, but this was ridiculous. With IBM's STRETCH computer as background, handling 64-character words divisible into groups of 8 (I designed the character set for it, under the guidance of Dr. Werner Buchholz, the man who DID coin the term 'byte' for an 8-bit grouping). […] It seemed reasonable to make a universal 8-bit character set, handling up to 256. In those days my mantra was 'powers of 2 are magic'. And so the group I headed developed and justified such a proposal […] The IBM 360 used 8-bit characters, although not ASCII directly. Thus Buchholz's 'byte' caught on everywhere. I myself did not like the name for many reasons. The design had 8 bits moving around in parallel. But then came a new IBM part, with 9 bits for self-checking, both inside the CPU and in the tape drives. I exposed this 9-bit byte to the press in 1973. But long before that, when I headed software operations for Cie. Bull in France in 1965–66, I insisted that 'byte' be deprecated in favor of 'octet'. […] It is justified by new communications methods that can carry 16, 32, 64, and even 128 bits in parallel. But some foolish people now refer to a '16-bit byte' because of this parallel transfer, which is visible in the UNICODE set. I'm not sure, but maybe this should be called a 'hextet'. […] 
  9. Blaauw, Gerrit Anne; Brooks, Jr., Frederick Phillips; Buchholz, Werner (June 1959). “Processing Data in Bits and Pieces”. 《IRE Transactions on Electronic Computers》: 121. 
내용주
  1. Many sources erroneously indicate a birthday of the term byte in July 1956, however, Werner Buchholz claimed that the term would have been coined in June 1956. In fact, the earliest document supporting this dates from 1956-06-11. Buchholz stated that the transition to 8-bit bytes was conceived in August 1956, however, so far the earliest document found using this notion dates from September 1956.