计算机导论 Introduction to Computer
Overview
In this course we mainly learned about :
- Two Architectures of Computer : von Neumann and Harvard
- Binary, Octal and Hexadecimal
- Representation of numbers: Sign-Magnitude, Ones' Complement and Two's complement
一、Two Architectures of Computer
There are two types of computer architectures. They regulate the composition of computers.
1. von Neumann Architecture
According to this architecture, a computer has three basic units:
- Central Processing Unit: contains Control Unit and Arithmetic Unit
- Main Memory Unit
- Input/Output Device
In this architecture, data and instructions share the memory.
2. Harvard Architecture
Unlike von Neumann architecture, data and instructions have their own memory.
二、Binary Octal Hexadecimal
Because of the characteristic of logic circuits, computer uses binary to represent all data.
But in order to help developers write and memorize data, we also use octal and hexadecimal to represent data.
Sometimes we need to convert them to each other.
三、原码、反码、补码
For a number, the computer must encode it and then store it.
There are three encoding methods: Sign-Magnitude, Ones' Complement, Two’s Complement
1. Sign-Magnitude
Sign and Magnitude, as the name implies.
-
The first bit represent sign of the number: 0 for positive, 1 for negative.
-
The remaining bits represent the magnitude of the number in binary.
2. Complement
Since Binary number system has only 2 digits (0 and 1), the complement of one digit is the other.
1) One's Complement
- One’s Complement of a positive number is itself
- One’s Complement of a negative number is based on its sign-magnitude, with the sign bit unchanged, and the remaining bits inverted.
2) Two's Complement
It's similar to One's Complement.
The main difference is that when the number is negative, 1 is added to the last after getting the complement.
We use two's complement to simplify the calculation. So that we don't need to specifically deal with sign bit.
原文地址:https://www.cnblogs.com/danielwong2021/p/15380780.html
- 小窗播放视频的原理和实现(上)
- 一种Android App在Native层动态加载so库的方案
- java的双缓冲技术
- application之OnLowMemory()和 OnTrimMemory(level)讲解
- React Native组件(一)组件的生命周期
- Spring Cloud构建微服务架构:服务消费(基础)【Dalston版】
- Android解析ClassLoader(一)Java中的ClassLoader
- Android学习笔记(一)之仿正点闹钟时间齿轮滑动的效果
- Android解析WindowManager(三)Window的添加过程
- Spring Cloud构建微服务架构:服务消费(Ribbon)【Dalston版】
- Android解析WindowManager(一)WindowManager体系
- ios9 http请求失败的问题
- Android内存优化(六)LeakCanary使用详解
- Spring Cloud构建微服务架构:服务消费(Feign)【Dalston版】
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- Java开发岗面试题--基础篇(一)
- leetcode链表之找出倒数第k个节点
- MAC下安装nginx的正确姿势 实践笔记
- 关于 ThreadLocal 你需要知道的几点
- 关于Guava ForwardingMap
- http post Request header is too large 开发环境和线上版本解决方案
- 像java一样使用js contains 数组包含方法 实践笔记
- 服务治理之重试篇
- 一次排查线上接口偶发异常耗时引起的思考!
- 台阶很高,青蛙跳不跳?
- 从零开始认识堆排序
- Redis SDS 深入一点,看到更多!
- Centos7下Oracle 11g r2 本地/远程 用exp/imp命令快速导入导出数据 实践笔记
- js常用函数大全107个
- xtraReprot 动态绑定数据 数据列动态