Data Register 크기가 궁금합니다.

wtwon의 이미지

최근에 컴퓨터 구조와 관련된 내용을 보다가 이런 문제를 봤습니다.

1. An imaginary computer has sixteen data register (R0 to R15), 1024 words in
memory, and 16 different instructions (add, subtract, and so on). What is the
minimum size of an instruction in bits if a typical instruction uses the following
format: instruction M R2
16 데이터 레지스터와 1024워드를 가지는 메모리 그리고 16개의 명령어들을 가지는 가상의 컴퓨터가 있습니다.
그렇다면 명령어의 최소 크기는(bits) 얼마인가? 명령어의 형태는 다음과 같습니다. add M R2

=> 우선 명령어의 형태를 보았을 때, 2주소 명령 : opcode operand1 operand2로 구성됩니다.
opcode의 크기는 4비트(2^4 -> 16개의 명령어), 메모리주소를 구분해야하는 피연산자의 크기는 10비트 (1024워드 -> 2^10) 그리고 연산에 쓰일 데이터 레지스터를 구분하는 피연산자의 크기는 4비트(2^4 -> R0~R15까지의 16개의 데이터 레지스터)
따라서 4 + 10 + 4 => 최소한 18비트가 되어야 한다는게 1번에 대한 제 답입니다.
이까지는 알겠는데 문제는 2번부터입니다.

2. If the computer in 1 uses the same size of word for data and instructions what is the size of each data register?
만약 1번 컴퓨터에서 word의 사이즈와 명령어들의 크기가 동일하다면, 각 데이터 레지스터의 크기는 얼마인가?

=> 한 워드의 크기와 Data Register의 크기는 동일하다고 배웠습니다.
(그 이유는 메모리에서 레지스터로 데이터를 옮길 때 처리되는 데이터의 크기가 워드이므로..가 맞나요?)

제가 2번에서 모르겠는 것은 instructions이 무엇을 말하는지 모르겠습니다.. 저것만 안다면 답은 뻔할텐데요..

컴퓨터 구조는 조금만 시간이 지나면 기억이 흐려지는 것 같아 힘드네요.. 구조 이해와 반복학습만이 답이겠지만요..
답변에 쓰시는 귀한시간 감사드립니다.

---------------------------------------------------------------------------------------------------

곰곰히 다시 생각해봤습니다. 자답합니다.
1 word는 데이터 처리에 필요한 명령어(또는 연산에 필요한 데이터)를 담고 있습니다.
즉, 명령어(Add M R2)에 필요한 최소한의 비트가 18비트라면, 1 word는 18비트가 되어야 합니다.
그리고 1 word가 18비트이므로 데이터 레지스터가 메모리로부터 데이터를 받는 크기도 1 word이므로 데이터 레지스터의 크기는 18비트가 되어야 합니다.

따라서 2번의 답인 각 데이터 레지스터의 크기는 18비트가 되어야 합니다.
라고 생각했습니다. 맞나요..?
틀린부분이 있으시면 지적해주시고 알려주시면 너무 감사하겠습니다.

bushi의 이미지

제시된 "same size of word for data and instructions" 외의 다른 것은 생각하지 않으셔도 될 것 같습니다.
저 조건이 들어간 이유 자체가 CISC 나 Havard architecture (및 유사품) 같은 놈들을 일괄 제거하기 위해서라 생각됩니다.
소싯적에 만지던 micom 중에 하나가 instruction 은 13bit, data 는 8bit 였습니다.

wtwon의 이미지

그런 이유가 있었군요.. 또 하나 배워갑니다.
그럼 말씀처럼 data register의 크기만 고려하면 되는군요.
감사합니다:)

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.