본문 바로가기

전체 글

(17)
Database Basic 1. Introduction to Databases Database is a special system that stores data. When we say 'database', it typically means "relational database". Database has a "Table" which contains information about what we care about. Let me give an example of retail services. In a database of retail service, there will be a time table with their product. Also, there will be a table of customers, orders, or item..
[Python] 변수와 자료형 보호되어 있는 글입니다.
Introduction to Data and Data Files 1. Introduction to Data Data is a various form of source and a numerical value caused by human action or control. There are many types of data in the world. For example, phone call history, payment record at the convenience store, saved file of the online game, pulse during the workout, watched Youtube video last night, marked the location of the new restaurant, etc. Text, video, record, numbers..
[JAVA] 5. Byte Variable package binary; public class ByteVariable { public static void main(String[] args) { byte bData = -128; System.out.println(bData); byte bData2 = 127; //byte는 2의 7제곱 -1 즉, 127까지는 표기가 되지만 byte bData3 = 128; //127을 넘어가게 되면 변수의 크기가 작아 표현할 수 없으므로 컴파일 오류가 발생한다. System.out.println(bData2); } }
[JAVA] 4. int Type Variable 변수 프로그래밍에서 값(data)를 사용하기 위해 선언하는 것 프로그램에서 사용되는 자료를 저장하기 위한 공간 할당 받은 메모리의 주소 대신 부르는 이름 프로그램 실행 중에 값 변경 가능 사용되기 이전에 선언되어야 함 영어로 variable 변수의 선언과 초기화 int level; //lebel 이라는 이름의 변수 선언 int level = 0; //level 변수 선언과 동시에 0으로 초기화 int level; level = 10; /* int의 역할: level 변수의 데이터 타입을 정의 int의 의미: level은 정수이며 4바이트의 메모리 공간을 사용한다. */ 예시 package binary; public class Varialbe { public static void main(String[] ..
[JAVA] 3. Calculating positive number and negative number package binary; public class Binarytest2 { public static void main(String[] args) { // TODO Auto-generated method stub int num1 = 0B00000000000000000000000000000101; int num2 = 0B11111111111111111111111111111011; int sum = num1 + num2; System.out.println(num1); System.out.println(num2); System.out.println(sum); } }
[JAVA] 2. Numbers by each numeral system package binary; public class Binarytest { public static void main(String[] args) { int num = 10; int bNum = 0B1010; //숫자 앞에 0B를 넣으면 뒤에 있는 수를 2진수로 인식한다. int oNum = 012; //숫자 앞에 0만 넣으면 뒤에 있는 수를 8진수로 인식한다. int hNum = 0Xa; //숫자 앞에 0X를 넣으면 뒤에 있는 수를 16진수로 인식한다. System.out.println(num); System.out.println(bNum); System.out.println(oNum); System.out.println(hNum); } }
기수법(Numeral System) 세상에는 여러가지 방법으로 숫자를 세는데 우리가 가장 흔하게 사용하는 방법은 10을 기준으로 세는 것입니다. There are many ways to count numbers. One of the most common methods is counting by ten. 10진수는 0에서 부터 9까지 차례대로 증가합니다. Base 10 counts 0 to 9 gradually. 만약 9 다음의 수를 표현할 때는 새로운 문자가 아닌 일의 자리를 0으로 만들고 십에 자리에 1을 추가해 표현합니다. 이 숫자가 바로 10이지요. If you want to express the next number of nine, you don't use a new character but put 1 at ten-digit and..