Embedded 1 - Computer Arithmetic and Logic Basics

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:03 AM on 10/9/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

Unsigned Binary Integers

Range: 0 to +2^n - 1

ex) Use 32-bits --> 0 to +4,294,967,295

2
New cards

Signed Binary Integers

Range: -2^n-1 to +2^n-1 - 1

ex) 32-bits --> -2,147,483,648 to +2,147,483,647

MSB is signed bit

3
New cards

overflow - signed numbers

adding + and - = no overflow

adding two + operands = overflow if result N=1 (looks neg but is pos)

adding two - operands = overflow if N=0 (looks pos)

4
New cards

S Suffix in ARM instructions

modifies the condition flags of CSPR

5
New cards

What would you observe for 8-bit operations? Are flags updated correctly?

flags are 32-bit based, must sign extend for it to work as expected

6
New cards

Sign Extension

takes MSB bit in the byte or half word and duplicates it up to the full data width

7
New cards

Positive number looks negative

there is carry from 30 to 31 but no carry put of 31 (C=0) --> N=1, V=1, C=0

8
New cards

Negative number looks positive

there is carry out of 31 (C=1) but no carry from 30 to 31 --> N=0, V=1, C=1

9
New cards

multiplication of signed numbers

mul Rd,Rn,Op2 // Rd = Rn*Op2

umull RdLo,RdHi,Rn,Rm

smull Rdlo,Rdhi,Rm,Rn

10
New cards

division

udiv Rd, Rm, Rn Rd = Rm / Rn [unsigned - only does integer division]

sdiv Rd,Rm,Rn Rd = Rm / Rn [signed]

11
New cards

conditional execution

Movxx

xx = EQ, NE, LT, GT, GE, LE

- condition is based on prior instruction that changed the flags

12
New cards

CMP

same as SUBS except result is discarded, flags are set

--> CMP RN, OP2 (RN-OP2)

13
New cards

CMN

same as ADDS except result discarded, flags set --> CMN RN, Op2 (RN + Op2)

14
New cards

LSL instruction

bits are shifted from R to L, 0 enters LSB and MSB exits to carry flag

MOVS Rd, Rn, LSL #numOfShiftLSL(S) Rd, Rn, #numOfShift

15
New cards

LSR instruction

bits are shifted from L to R, 0 enters MSB and LSB exits to carry flag

LSR(S) Rd, Rn, #numOfShift ;Logical Shift RightMOVS Rd, Rn, LSR #numOfShift

16
New cards

ROR instruction

bits roatetd from L to R, LSB goes to MSB and to the carry flag

ROR Rd, Rm, #numOfShifts ;Rotate Rm right Rn bit positions

MOVS Rd, Rm, ROR #numOfShifts

17
New cards

RRXS instruction

RRXS the C is moved to the MSB, and the LSB is moved to the C

18
New cards

ASR Instruction

MSB is held constant and the LSB exits to

the carry flag

ASR(S) Rd, Rm, #count @Arithmetic Shift Right

MOVS Rd, Rm, ASR #count

Preserves the sign!

19
New cards

What can AND be used for?

to clear specific bits of a byte

20
New cards

What can OR be used for?

to set specific bits of a byte

Explore top notes

note
Learn to Lead Chapter 1 Review
Updated 401d ago
0.0(0)
note
Chapter 19 - Types of Selection
Updated 1310d ago
0.0(0)
note
Chapter 11: Sound
Updated 1043d ago
0.0(0)
note
WW2 1939-1945
Updated 1398d ago
0.0(0)
note
ANATOMY
Updated 1423d ago
0.0(0)
note
Learn to Lead Chapter 1 Review
Updated 401d ago
0.0(0)
note
Chapter 19 - Types of Selection
Updated 1310d ago
0.0(0)
note
Chapter 11: Sound
Updated 1043d ago
0.0(0)
note
WW2 1939-1945
Updated 1398d ago
0.0(0)
note
ANATOMY
Updated 1423d ago
0.0(0)

Explore top flashcards

flashcards
unit 4
126
Updated 1129d ago
0.0(0)
flashcards
ķīmija
21
Updated 1223d ago
0.0(0)
flashcards
engels unit 4: vocabulary
146
Updated 1124d ago
0.0(0)
flashcards
ADHD- Krysiak
42
Updated 279d ago
0.0(0)
flashcards
English Language Paper 1
36
Updated 691d ago
0.0(0)
flashcards
ENGLISH EXAM
101
Updated 810d ago
0.0(0)
flashcards
Spanish 3: Ser Estar Tener
72
Updated 71d ago
0.0(0)
flashcards
Unit 1 Part 1 - Modules 1 - 3
36
Updated 813d ago
0.0(0)
flashcards
unit 4
126
Updated 1129d ago
0.0(0)
flashcards
ķīmija
21
Updated 1223d ago
0.0(0)
flashcards
engels unit 4: vocabulary
146
Updated 1124d ago
0.0(0)
flashcards
ADHD- Krysiak
42
Updated 279d ago
0.0(0)
flashcards
English Language Paper 1
36
Updated 691d ago
0.0(0)
flashcards
ENGLISH EXAM
101
Updated 810d ago
0.0(0)
flashcards
Spanish 3: Ser Estar Tener
72
Updated 71d ago
0.0(0)
flashcards
Unit 1 Part 1 - Modules 1 - 3
36
Updated 813d ago
0.0(0)