COSC 3332 Study Notes

Course Overview

  • Course: COSC 3332 Computer Organization and Architecture

  • Instructor: Dr. Qi Zhu

Course Objectives

  • Understand numerical data representation and manipulation in digital computers.

  • Master conversion between various radix systems.

  • Learn about computational errors due to overflow and truncation.

Key Topics

  1. Introduction to computer systems

  2. Radix systems

  3. Unsigned binary representation

  4. Two's complement binary representation

  5. Operations in binary

  6. Hexadecimal and character representations

Data Representation

  • Digital computers recognize two states: on (1) and off (0).

  • Binary system uses two digits: 0 and 1 (bit).

  • Byte consists of 8 bits.

  • Word is a group of bytes, common sizes: 16, 32, 64 bits.

  • Nibble = 4 bits.

Coding Systems

  • ASCII: American Standard Code for Information Interchange.

  • EBCDIC: Extended Binary Coded Decimal Interchange Code.

  • Unicode: Represents all world languages.

Radix Systems

  • Decimal (base 10), Octal (base 8), Binary (base 2).

  • Example of conversions:

    • Decimal to Binary: 26=001101026 = 0011010

Unsigned Integers

  • Range determined by bit count. Example: 7-bit cell ranges from 0 to 127.

  • Unsigned addition rules:

    • Carry bit indicates overflow in sums.

Two's Complement Representation

  • Used for representing negative integers.

  • First bit indicates sign (0=positive, 1=negative).

  • Process for getting negative: Invert bits (NOT) and add 1.

  • Example: 7=000111extand−7=1110017 = 00 0111 ext{ and } -7 = 11 1001.

  • Range for 4-bit: [-8, +7].

Overflow and Special Bits

  • Carry bit (C) for unsigned overflow detection.

  • Overflow bit (V) for signed overflow detection.

  • Additional bits: Negative (N) and Zero (Z).

Binary Operations

  • Logical operations: AND, OR, NOT.

  • Arithmetic operations: ASL (shift left), ASR (shift right), multiplication, and division.

Hexadecimal Representation

  • Base 16 digits: 0-9 and A-F (10-15).

  • Conversion methods to binary, decimal, and other bases.

Conclusion

  • Data stored as bits, bytes, and words using binary system, focusing on binary, decimal, hexadecimal, and octal conversions.