ساختار و زبان کامپیوتر: نمایش اعداد حقیقی

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

نقطه ثابت به چه نوع داده‌ای اشاره دارد؟

  • داده‌هایی با دقت متغیر
  • داده‌هایی با اعداد کسری تنها
  • داده‌هایی با عدد صحیح و بدون تغییر (correct)
  • تنها داده‌های عددی بزرگ

تفاوت اصلی بین عدد نقطه ثابت و نقطه شناور چیست؟

  • نقطه شناور به ذخیره‌سازی بیت‌ها وابسته نیست
  • نقطه ثابت تنها اعداد مثبت را شامل می‌شود
  • نقطه شناور می‌تواند مقادیر بسیار بزرگ را نمایندگی کند (correct)
  • نقطه ثابت همیشه منفی است

کدام یک از دستورات زیر مربوط به MIPS نیستند؟

  • دستور بارگذاری جمله
  • دستور ورود و خروج (correct)
  • دستور عملیات جمع و تفریق بر روی اعداد نقطه شناور
  • دستور انتقال اعداد از نقطه ثابت به شناور

چگونه می‌توان دقت یک عدد نقطه شناور را افزایش داد؟

<p>با افزایش تعداد ارقام قابل ذخیره‌سازی (C)</p> Signup and view all the answers

فرایند تبدیل یک عدد از نقطه ثابت به نقطه شناور نیاز به چه مواردی دارد؟

<p>بررسی علامت و مقدار صحیح عدد (D)</p> Signup and view all the answers

مزیت اصلی نمایه‌سازی فلوتینگ نسبت به نمایه‌سازی ثابت چیست؟

<p>دامنه وسیع‌تر (B)</p> Signup and view all the answers

کدام یک از موارد زیر جزء معایب نمایه‌سازی فلوتینگ به حساب می‌آید؟

<p>عملیات ریاضی پیچیده‌تر (A)</p> Signup and view all the answers

در نمایه‌سازی فلوتینگ، مقدار N با کدام فرمول محاسبه می‌شود؟

<p>N = (-1)^S * (1 + F) * 2^E (D)</p> Signup and view all the answers

مزایای دقت بالای نمایه‌سازی فلوتینگ می‌تواند چه عواقبی داشته باشد؟

<p>امکان بروز overflow (D)</p> Signup and view all the answers

کدام یکی از اجزای نمایه‌سازی فلوتینگ 23 بیت را شامل می‌شود؟

<p>کسر (F) (B)</p> Signup and view all the answers

کدام یک از دستورهای MIPS برای جمع دو عدد با دقت تک‌دقیقه صحیح است؟

<p>add.s (B)</p> Signup and view all the answers

در MIPS، کدام دستور برای بارگذاری عدد اعشاری از حافظه به ثبت استفاده می‌شود؟

<p>lwc1 (D)</p> Signup and view all the answers

کدام یک از ثبت‌های MIPS برای نگهداری عدد اعشاری استفاده می‌شود؟

<p>$f0 (B)</p> Signup and view all the answers

کدام یک از دستورات زیر برای تقسیم عدد با دقت دوگانه صحیح است؟

<p>div.d (C)</p> Signup and view all the answers

کدام یک از موارد زیر در FP مقایسه استفاده می‌شود؟

<p>c.x.s (B)</p> Signup and view all the answers

چند ثبت برای نگهداری عددهای با دقت دوگانه در MIPS وجود دارد؟

<p>32 (C)</p> Signup and view all the answers

کدام یک از دستورهای زیر مربوط به مرتبه بندی عددهای لگاریتمی در FP است؟

<p>mul.s (A)</p> Signup and view all the answers

کدام مورد نمی‌تواند باعث زیر آب رفتن عدد در FP شود؟

<p>توان مثبت بسیار بزرگ (D)</p> Signup and view all the answers

کدام یک از اعداد زیر در نمای علمی نرمال شده است؟

<p>1.25 * 10-12 (A)</p> Signup and view all the answers

چه نوع نمایشی در پردازنده‌های بدون واحد نقطه شناور استفاده می‌شود؟

<p>نمایش نقطه ثابت (D)</p> Signup and view all the answers

کدام یک از اعداد زیر بزرگترین عدد مثبت در نمایش 5 بیتی نقطه ثابت است؟

<p>111.11 (B)</p> Signup and view all the answers

کدام یک از گزینه‌های زیر نمایشی بهینه‌تر برای انجام محاسبات است؟

<p>نقطه ثابت (C)</p> Signup and view all the answers

کدام یک از گزینه‌های زیر نمایشی غیرنرمالیزه برای 1/1,000,000,000 است؟

<p>0.1 x 10-8 (A), 10.0 x 10-10 (D)</p> Signup and view all the answers

کدام یک از گزینه‌های زیر نکته‌ای درباره نمایش نقطه ثابت نیست؟

<p>سخت‌افزار پیچیده‌ای نیاز دارد. (B)</p> Signup and view all the answers

کدام یک از گزینه‌های زیر نمایشی در سیستم باینری است؟

<p>1.0two x 2-1 (A)</p> Signup and view all the answers

در نمایش نقطه ثابت 5 بیتی، کد باینری 000.01 چه مقداری را نشان می‌دهد؟

<p>1/32 (D)</p> Signup and view all the answers

Flashcards

اعداد با نقطه ثابت

در اعداد با نقطه ثابت، بخش اعشاری به صورت ثابت در مکان مشخصی قرار می‌گیرد که توسط تعداد بیتی که به آن اختصاص داده‌شده است، مشخص می‌شود. این عددها بیشتر برای نمایش مقادیر دقیق در بازه مشخصی استفاده می‌شوند.

اعداد با نقطه شناور

در اعداد با نقطه شناور، بخش اعشاری به صورت متغیر و با توانی از پایه نمایانگر عدد قرار می‌گیرد. این نمایش اجازه می‌دهد مقادیر بسیار بزرگ یا بسیار کوچک را با استفاده از تعداد محدودی بیت نمایش دهیم.

دستورالعمل‌های نقطه شناور در MIPS

دستورالعمل‌های نقطه شناور، عملگرهایی هستند که برای انجام محاسبات بر روی اعداد با نقطه شناور در پردازنده‌ها استفاده می‌شوند. این دستورالعمل‌ها شامل جمع، تفریق، ضرب، تقسیم و مقایسه می‌شوند.

نمایش اعداد با نقطه شناور در MIPS

در این نوع نمایش اعداد، اعداد با نماهای مختلف (از پایه 2) نشان داده می‌شوند. نقطه اعشار ثابت باقی می‌ماند. این نوع نمایش برای نشان دادن مقادیر با اعداد بسیار کوچک و بزرگ استفاده می‌شود.

Signup and view all the flashcards

اعداد با نقطه ثابت

در اعداد با نقطه ثابت، بخش اعشاری به صورت ثابت در مکان مشخصی قرار می‌گیرد که توسط تعداد بیتی که به آن اختصاص داده‌شده است، مشخص می‌شود. این عددها بیشتر برای نمایش مقادیر دقیق در بازه مشخصی استفاده می‌شوند.

Signup and view all the flashcards

اعداد حقیقی

اعدادی که می توانند شامل اعداد صحیح، کسرها، اعداد گنگ و اعداد مختلط باشند. مثلاً 3.14159، 2.17، 0.0000001 و غیره.

Signup and view all the flashcards

نماد علمی

روشی برای نمایش اعداد بسیار بزرگ یا بسیار کوچک که یک عدد مختلط و یک توان ده را شامل می شود. مثلاً 1.25 * 10-12 و 1.43 * 10+12 .

Signup and view all the flashcards

نماد علمی نرمال

شکل استاندارد نماد علمی که دقیقا یک رقم غیر صفر در سمت چپ نقطه اعشار قرار میگیرد. مثلاً 1.25 * 10-12 و 1.43 * 10+12 .

Signup and view all the flashcards

مانتیسا

بخشی از نماد علمی که شامل اعداد و نقطه اعشار است.

Signup and view all the flashcards

توان

بخشی از نماد علمی که توان ده را نشان می دهد.

Signup and view all the flashcards

نمایش نقطه ثابت

روشی برای ذخیره اعداد حقیقی در کامپیوتر که یک عدد صحیح را به همراه یک بخش اعشاری نمایش می دهد. مثلاً d23d22…d1d0.f0f1f2f3f4f5f6f7 .

Signup and view all the flashcards

بخش صحیح

بخش صحیح عدد در نمایش نقطه ثابت.

Signup and view all the flashcards

بخش اعشاری

بخش اعشاری عدد در نمایش نقطه ثابت.

Signup and view all the flashcards

نمایش اعشاری شناور

اعداد اعشاری را در قالب نماد علمی در مبنای دو نمایش می‌دهد.

Signup and view all the flashcards

مزایای نمایش اعشاری شناور

در نمایش شناور، محدوده اعداد قابل نمایش بسیار زیاد است. به عنوان مثال

Signup and view all the flashcards

مزایای نمایش اعشاری شناور (ادامه)

در نمایش شناور، تعدادی بیت بیشتری برای نمایش دقت عدد موجود است. به عنوان مثال

Signup and view all the flashcards

معایب نمایش اعشاری شناور

در نمایش شناور، عملیات ریاضی پیچیده‌تر است. به عنوان مثال

Signup and view all the flashcards

معایب نمایش اعشاری شناور (ادامه)

در نمایش اعشاری شناور، پیاده سازی سخت افزار پیچیده‌تر است. به عنوان مثال

Signup and view all the flashcards

خطای سرریز نمایی

عدد نمایی بسیار بزرگ که در قسمت نمایی کلمه ماشین نمی‌گنجد.

Signup and view all the flashcards

خطای

عددی که به طور کلی در قسمت کسری صفر است و مقدار آن بسیار کوچک است.

Signup and view all the flashcards

دستورالعمل های ممیز شناور در MIPS

در MIPS ، هر دو دستورالعمل‌های single-precision و double-precision برای عملیات روی اعداد اعشاری پشتیبانی می‌شوند.

Signup and view all the flashcards

Registers ممیز شناور در MIPS

در MIPS ، Registers ممیز شناور با نماد "f " شروع می‌شوند و 32 register از $f0 تا $f31 وجود دارد.

Signup and view all the flashcards

تفاوت single-precision و double-precision در MIPS

در MIPS هر یک register ممیز شناور، هم single-precision و هم double-precision را پشتیبانی می‌کند. برای double-precision ، از register ها ی جفت استفاده می‌شود که register اولی 짝 register برای آن محسوب می‌شود، با استفاده از عدد register اولی به عنوان نام.

Signup and view all the flashcards

دستورالعمل‌های load/store برای Registers ممیز شناور در MIPS

دستورالعمل‌های lwc1 و swc1 برای بارگذاری و ذخیره مقادیر ممیز شناور در حافظه در MIPS به کار ‌می‌روند.

Signup and view all the flashcards

فرمت دستورالعمل ها در ممیز شناور MIPS

فرمت دستورالعمل ها به این صورت است: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Signup and view all the flashcards

IEEE 754

IEEE 754 استاندارد بین‌المللی برای نمایش اعداد ممیز شناور در کامپیوتر است.

Signup and view all the flashcards

Study Notes

Computer Structure & Language: Fixed-Point & Floating Point

  • This lecture covers fixed-point and floating-point representations of real numbers in computer systems.
  • Content is adopted from various sources including "Computer Organization & Design", "Hardware/Software Interface", and other academic materials.
  • Topics covered include fixed-point representation, floating-point representation, instructions in MIPS, and FP coprocessors.

Real Numbers

  • Real numbers are numbers with fractional parts.
  • Examples include 3.14159..., 2.17, 0.0000001, 1.25 * 10-12, and 1.43 * 1012.

Real Notations

  • Scientific notation represents numbers in the form of a significand (mantissa) multiplied by a power of 10 (exponent).
  • Normalized scientific notation specifies that the significand should be between 1.0 and 10.0
  • Examples include 0.21 * 10-12, and 5.33 * 1012
  • Normalized scientific notation in Binary will be like 1.0two * 2-1

Real Numbers in Computers

  • Fixed-Point Representation: Represents numbers with a fixed number of bits for the integer and fractional parts.
  • Example: d2d1d0.f1f0 represents a number with 24 bits for integer and 8 bits for fraction parts.
  • Used in CPUs without floating-point units, microcontrollers, and DSP applications.

Fixed-Point Representation (Examples)

  • The largest positive number, the smallest positive number, the largest magnitude negative number, and the smallest magnitude negative number in a 5-bit fixed-point representation are discussed.

Fixed-Point Representation (Examples)

  • Further examples of simple binary fixed-point operations like addition, subtraction, multiplication, and division are given. Examples include 011.11 + 111.11, 010.10 * 000.10, 011.10 * 010.11 and 000.01 * 000.01

Fixed-Point Representation (Pros & Cons)

  • Pros: Simple hardware, fast computation and flexibility for different precisions per application.
  • Cons: Low precision and a small range.

Floating-Point Representation

  • Floating-point representation represents numbers in the form of 1.XXXXXXtwo * 2yyyy
  • A single precision floating-point number consists of a sign bit (S), an exponent (E), and a fraction (F).
    • The fraction has 23 bits.
    • The exponent has 8 bits.
  • N = (-1)S * (1 + F) * 2E

Floating-Point Representation (Pros & Cons)

  • Pros: Wide range and greater precision in comparison to fixed-point
  • Cons: Arithmetic operations are more complex, hardware implementation is more complicated.

Floating-Point Representation (Issues)

  • Overflow: Occurs if the exponent becomes too large to fit in the allocated bits. In that case, the result may be too large to be represented.
  • Underflow: Occurs if the fraction part becomes too small. It may be considered zero in the representation.

Floating-Point Instructions in MIPS

  • MIPS architecture supports single and double-precision floating-point instructions.
  • Examples include add.s, sub.s, mul.s, div.s, add.d, sub.d, mul.d, div.d, and c.x.s and c.x.d.

FP Coprocessor

  • A dedicated coprocessor (often known as the FPU) handles floating-point operations.
  • The coprocessor improves performance by offloading floating-point calculations.

FP Registers

  • MIPS provides separate floating-point registers (like $f0, $f1, ..., $f31).
  • These registers support single and double-precision formats.
  • A double precision register uses a pair of even/odd numbers to store values.

FP Instruction Format

  • Various floating-point instructions' formats are detailed in a table.

Next Topics

  • IEEE 754 standard for floating point definitions, single-precision, and double-precision.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser