Skip to content

Commit

Permalink
Merge pull request #119 from TienNHM/tutorials/caal
Browse files Browse the repository at this point in the history
`[docs]` - move caal to blogs
  • Loading branch information
TienNHM committed Jan 20, 2024
2 parents a0dcbb8 + ec5a75b commit de3c3d5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
title: Lý thuyết hệ thống số trong máy tính
slug: data-representation
title: Lý thuyết hệ thống số trong máy tính
description: "Lý thuyết hệ thống số trong máy tính: hệ nhị phân, hệ thập phân, hệ bát phân, hệ thập lục phân."
image: https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Values_of_digits_in_the_Decimal_numeral_system.svg/1280px-Values_of_digits_in_the_Decimal_numeral_system.svg.webp
sidebar_position: 0
tags:
- number-system
- data-representation
- CAAL
authors: [tiennhm]
tags: [number-system, data-representation, CAAL]
keywords: [number-system, data-representation, CAAL]
enableComments: true # for Gisqus comments, set to true
draft: false # set to true to hide this post from the site
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Lý thuyết hệ thống số trong máy tính
<p align="right">
<img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Ftiennhm.github.io%2Fblog%2Fdata-representation&label=⚪Views&labelColor=%2337d67a&countColor=%23555555&style=flat&labelStyle=upper" loading='lazy' decoding='async'/>
</p>

[![](https://img.shields.io/badge/PDF-Download-green.svg)](https://github.com/ITUTE/CAAL/raw/main/TienNHM/Slides-VN/C1-Number-systems.pdf)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
---
title: Biểu diễn số nguyên dương trong các hệ số
slug: unsigned-integer-representation
title: Biểu diễn số nguyên dương trong các hệ số
description: Biểu diễn số nguyên dương trong hệ thập phân, hệ nhị phân và hệ thập lục phân
image: https://upload.wikimedia.org/wikipedia/commons/4/49/Hexadecimal_digit.png
sidebar_position: 1
tags:
- number-system
- data-representation
- CAAL
- unsigned-integer
- binary
- hexadecimal
- decimal
authors: [tiennhm]
tags: [number-system, data-representation, CAAL, unsigned-integer, binary, hexadecimal, decimal]
keywords: [number-system, data-representation, CAAL, unsigned-integer, binary, hexadecimal, decimal]
enableComments: true # for Gisqus comments, set to true
draft: false # set to true to hide this post from the site
---

# Biểu diễn số nguyên dương trong các hệ số
<p align="right">
<img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Ftiennhm.github.io%2Fblog%2Funsigned-integer-representation&label=⚪Views&labelColor=%2337d67a&countColor=%23555555&style=flat&labelStyle=upper" loading='lazy' decoding='async'/>
</p>

## Lý thuyết

### Các hệ số đếm thường sử dụng trong máy tính
### 1. Các hệ số đếm thường sử dụng trong máy tính

- Cơ số của một hệ: là số chữ số được dùng để biểu diễn các giá trị.
- Các hệ cơ bản:
Expand All @@ -34,7 +29,7 @@ draft: false # set to true to hide this post from the site
+ Hệ thập lục phân (H) hay hệ cơ số 16: Dùng 16 chữ - số: 10 số 0,1,2,3,4,5,6,7,8,9 và 6 chữ cái A,B,C,D,E,F để biểu diễn tất cả các số.
> Ví dụ: 1B5E<sub>16</sub> = 1B5EH
### Chuyển đổi số nguyên dương sang hệ thập phân
### 2. Chuyển đổi số nguyên dương sang hệ thập phân

<p align="center">
<img src="https://res.cloudinary.com/df3zf2d1g/image/upload/v1702198414/docs/caal/01-data-representation-computer-arithmetic/C1-Number-systems-convert-to-decimal_xfbzdr.webp" loading='lazy' decoding='async' alt="convert-to-decimal"/>
Expand All @@ -47,9 +42,9 @@ draft: false # set to true to hide this post from the site
- Chuyển đổi số 1E4A<sub>16</sub> sang hệ thập phân:
> 1E4A<sub>16</sub> = 1 × 16<sup>3</sup> + 14 × 16<sup>2</sup> + 4 × 16<sup>1</sup> + 10 × 16<sup>0</sup> = 7754
### Chuyển đổi số nguyên dương từ hệ thập phân sang các hệ khác
### 3. Chuyển đổi số nguyên dương từ hệ thập phân sang các hệ khác

#### Từ hệ thập phân sang hệ nhị phân
#### 3.1. Từ hệ thập phân sang hệ nhị phân

Để chuyển đổi một số nguyên dương từ hệ thập phân sang hệ nhị phân:
- Ta thực hiện phép chia cho 2, được phần kết quả `m` và phần dư `r` (1 hoặc 0).
Expand All @@ -61,17 +56,17 @@ draft: false # set to true to hide this post from the site
<img src="https://res.cloudinary.com/df3zf2d1g/image/upload/v1702200158/docs/caal/01-data-representation-computer-arithmetic/C1-Number-systems-dec2bin_ylfq9g.webp" loading='lazy' decoding='async' alt="dec2bin"/>
</p>

#### Từ hệ thập phân sang hệ thập lục phân
#### 3.2. Từ hệ thập phân sang hệ thập lục phân

<p align="center">
<img src="https://res.cloudinary.com/df3zf2d1g/image/upload/v1702200909/docs/caal/01-data-representation-computer-arithmetic/C1-Number-systems-dec2hexpng_kjh3au.webp" loading='lazy' decoding='async' alt="dec2hex"/>
</p>

#### Từ hệ thập phân sang hệ bát phân
#### 3.3. Từ hệ thập phân sang hệ bát phân

Việc chuyển đổi số nguyên dương từ hệ thập phân sang hệ bát phân là tương tự như việc chuyển đổi từ thập phân sang nhị phân/ thập lục phân, chỉ khác ở đây là ta thực hiện phép chia cho 8.

### Chuyển đổi số nguyên dương giữa hệ nhị phân, hệ thập lục phân và hệ bát phân
### 4. Chuyển đổi số nguyên dương giữa hệ nhị phân, hệ thập lục phân và hệ bát phân

<p align="center">
<img src="https://res.cloudinary.com/df3zf2d1g/image/upload/v1702192054/docs/caal/01-data-representation-computer-arithmetic/C1-Number-systems-06_dp3s7c.webp" loading='lazy' decoding='async' alt="6"/>
Expand Down Expand Up @@ -125,7 +120,7 @@ Bạn có thể sử dụng trang web [RapidTables](https://www.rapidtables.com/

## Bài tập

### 1. Write each of the following decimal numbers in binary:
#### 1. Write each of the following decimal numbers in binary:

> Chuyển các số thập phân (hệ 10) sang nhị phân (hệ 2)
Expand All @@ -138,7 +133,7 @@ e. 9 => 0000 1001 k. 32 => 0010 0000
f. 12 => 0000 1100 l. 64 => 0100 0000
```

### 2. Write each of the following binary numbers in decimal:
#### 2. Write each of the following binary numbers in decimal:

> Chuyển các số nhị phân (hệ 2) sang thập phân (hệ 10)
Expand All @@ -151,7 +146,7 @@ e. 00001011 => 11 k.10100000 => 160
f. 00011100 => 28 l.10101010 => 170
```

### 3. Write each of the following binary numbers in hexadecimal:
#### 3. Write each of the following binary numbers in hexadecimal:

> Chuyển các số hệ nhị phân (hệ 2) sang hệ thập lục phân (hệ 16)
Expand All @@ -164,7 +159,7 @@ e. 00001011 => 000Bh k.10100000 => 00A0h
f. 00011100 => 001Ch l.10101011 => 00ABh
```

### 4. Write each of the following hexadecimal numbers in binary:
#### 4. Write each of the following hexadecimal numbers in binary:

> Chuyển các số hệ thập lục phân (hệ 16) sang hệ nhị phân (hệ 2)
Expand All @@ -177,7 +172,7 @@ e. 000Bh => 0000 1011 k. A064h => 1010 0000 0110 0100
f. 001Ch => 0001 1100 l. ABDEh => 1010 1011 1101 1110
```

### 5. Write each of the following hexadecimal numbers in decimal:
#### 5. Write each of the following hexadecimal numbers in decimal:

> Chuyển các số hệ thập lục phân (hệ 16) sang thập phân (hệ 10)
Expand Down
8 changes: 0 additions & 8 deletions docs/03-caal/_category_.json

This file was deleted.

This file was deleted.

0 comments on commit de3c3d5

Please sign in to comment.