計算機器怎麼製造
㈠ 如何製作簡單的計算器
(1)先畫個頁面,把每個數字
運算符號放進去;
(2)然後每個數字
符號綁定一個事內件,這個事件獲取數字或容者符號的值,放進一個Input框;
(3)點擊計算,把Input框的字元串
表達式計算
,eval("1*2");
(4)還有計算前要對表達式進行校驗,不規則的表達式不能計算。
㈡ 怎樣製作一台計算器(不是計算機,不是用電腦軟體製作)
不能
只能用軟體來做你所看的的計算機不管大小其實都是調用的一種程序晶元里邊的程序
這種程序是載入好的
㈢ 你知道計算器是如何做出來的嗎
你去找本經濟學書,上面講資金的時間價值的章節就有計算貸款還款的幾個公式
然後你用excel 就可版以把公式和變數權寫好 然後計算 這個是最簡單的
復雜點就編程吧,至於編程語言,那就太多了,幾乎都能做出這個東西
不過這是一個知識體系的問題了
如果我上面說的,你一句都不懂,那就去網上下個現成的吧
㈣ 計算器的屏幕是怎麼製造的
是液晶屏幕
上下2塊玻璃,中間是液晶,玻璃上有透明電路,加電壓液晶分子回偏轉,光線不能反射回來,就變答成黑色的
http://ke..com/link?url=ZpL3__W30c5ILyXnJXat4myc31oC_QJRVqfKk4RNCzMdgvMKMIK
㈤ 電腦是怎麼做出來的
電腦的主板、CPU等等部件都是獨立生產的,然後集成在一起。CPU是超大規模集成電路,在一塊九平方厘米或者十六平方厘米左右的集成板上集成數以億計的晶體管,主要是CMOS、PMOS等。最初計算機有幾個部件:運算器、控制器、存儲器、輸入輸出設備。運算器就是現在的電腦的CPU,但是現在的CPU已經比較復雜,不再是單純的計算器,因為都集成了緩存和控制器,集成了部分存儲器的性質。其中典型的一級代碼緩存,二級數據緩存和最新的三級數據緩存。控制器用於發出和接受指令——控制計算和數據的輸入輸出。存儲器就是ROM和RAM,ROM是只讀存儲器,存儲的數據是運算器工作的流程和模式,不可以更改,RAM是可擦除存儲設備,可以寫入程序還可以更改或者清除。輸入輸出設備包括最初的輸入輸出匯流排、介面和現在的電腦上的滑鼠、鍵盤、網線、顯示器、攝像頭、話筒、列印機,指紋頭像識別識別以及一些高端設備上的先進的語音指令系統、視頻指令系統等等。
現在的電腦,主板主要集成了匯流排以及匯流排介面和後來加的輸入輸出設備輔助設備——顯卡。主要存儲設備由於操作系統的出現需要插在主板內存介面上——內存插槽。系統所佔的部分相當於ROM,一旦變成RAM就是中了病毒木馬,其餘部分相當於RAM。很多手機廠商根本分不清ROM和RAM,在中關村網站上這種錯誤太多了。只有RAM部分才可以裝軟體,ROM部分是只讀的,一般不可以更改,除非刷機重裝系甚至崩潰,危害極大的病毒木馬就是這個原理用程序編寫的。對於一台電腦,以上是硬體設備,還有軟體設備,一般存儲在ROM-部分內存中,主板的BIOS相當於主板的ROM+RAM對主板支持其他設備運行進行控制和支持。所以現在的電腦已經不是單一計算機系統,而是多個系統的集成。軟體部分本人了解的不多,組成更復雜,本質都是匯編以及C系語言程序,當然手機和小型系統一般都用JAVA編程
㈥ 怎麼做一個JAVA計算器
classCalcBtnextendsJButton{
=1L;
Fontfont=newFont("仿宋",1,22);
publicCalcBtn(Stringtext,Colorcolor){
(text);
setForeground(color);
setFont(font);
setMargin(newInsets(0,0,0,0));
setFocusable(false);
}
}
@SuppressWarnings("serial")
{
publicstaticvoidmain(String[]args){
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}catch(Exceptionex){
ex.printStackTrace();
}
newCalcFrame().setVisible(true);
}
privateCalcBtnbtn_1=newCalcBtn("1",Color.BLUE);
privateCalcBtnbtn_2=newCalcBtn("2",Color.BLUE);
privateCalcBtnbtn_3=newCalcBtn("3",Color.BLUE);
privateCalcBtnbtn_4=newCalcBtn("4",Color.BLUE);
privateCalcBtnbtn_5=newCalcBtn("5",Color.BLUE);
privateCalcBtnbtn_6=newCalcBtn("6",Color.BLUE);
privateCalcBtnbtn_7=newCalcBtn("7",Color.BLUE);
privateCalcBtnbtn_8=newCalcBtn("8",Color.BLUE);
privateCalcBtnbtn_9=newCalcBtn("9",Color.BLUE);
privateCalcBtnbtn_0=newCalcBtn("0",Color.BLUE);
privateCalcBtnbtn_back=newCalcBtn("←",Color.red);
privateCalcBtnbtn_c=newCalcBtn("C",Color.red);
privateCalcBtnbtn_ce=newCalcBtn("CE",Color.red);
privateCalcBtnbtn_sub=newCalcBtn("-",Color.red);
privateCalcBtnbtn_multi=newCalcBtn("*",Color.red);
privateCalcBtnbtn_div=newCalcBtn("/",Color.red);
privateCalcBtnbtn_add=newCalcBtn("+",Color.red);
privateCalcBtnbtn_sqrt=newCalcBtn("sqrt",Color.BLUE);
privateCalcBtnbtn_mod=newCalcBtn("%",Color.BLUE);
privateCalcBtnbtn_x=newCalcBtn("1/x",Color.BLUE);
privateCalcBtnbtn_res=newCalcBtn("=",Color.red);
privateCalcBtnbtn_point=newCalcBtn(".",Color.red);
privateCalcBtnbtn_flag=newCalcBtn("+/-",Color.BLUE);
privateJButtonbtn_mem=newJButton("");
privateCalcBtnbtn_m=newCalcBtn("M+",Color.BLUE);
privateCalcBtnbtn_mc=newCalcBtn("MC",Color.BLUE);
privateCalcBtnbtn_mr=newCalcBtn("MR",Color.BLUE);
privateCalcBtnbtn_ms=newCalcBtn("MS",Color.BLUE);
JPanelpan_jtf=newJPanel();
JPanelpan_back=newJPanel();
JPanelpan_mem=newJPanel();
JPanelpan_num=newJPanel();
JTextFieldjtf_res=newJTextField();
//
privateJMenuBarmenuBar=newJMenuBar();
privateJMenumenu_edit=newJMenu("編輯(E)");
privateJMenumenu_view=newJMenu("查看(V)");
privateJMenumenu_help=newJMenu("幫助(H)");
privateJMenuItemeditMenu_=newJMenuItem("復制(C)");
privateJMenuItemeditMenu_paste=newJMenuItem("粘貼(P)");
_standard=newJCheckBoxMenuItem(
"標准型(T)");
_science=newJCheckBoxMenuItem("科學型(S)");
_grouping=newJCheckBoxMenuItem(
"數字分組(I)");
privateJMenuItemhelpmenu_help=newJMenuItem("幫助主題(H)");
privateJMenuItemhelpmenu_about=newJMenuItem("關於計算器(A)");
Stringsave1,save2;
BigDecimalop1,op2;
booleanisBigDecimal=false;
intpreOp,currentOp=0;
StringBufferstr=newStringBuffer();
publicCalcFrame(){
this.setTitle("於☆弦");
this.setResizable(false);
setSize(444,390);
setLocationRelativeTo(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setJMenuBar(menuBar);
setLayout(null);
init_pan_jtf();
init_menuBar();
init_pan_back();
init_pan_mem();
init_pan_num();
getContentPane().add(pan_jtf);
getContentPane().add(pan_back);
getContentPane().add(pan_mem);
getContentPane().add(pan_num);
}
privatevoidinit_menuBar(){
menuBar.add(menu_edit);
menuBar.add(menu_view);
menuBar.add(menu_help);
menu_edit.add(editMenu_);
menu_edit.add(editMenu_paste);
menu_view.add(viewmenu_standard);
menu_view.add(viewmenu_science);
menu_view.addSeparator();
menu_view.add(viewmenu_grouping);
menu_help.add(helpmenu_help);
menu_help.addSeparator();
menu_help.add(helpmenu_about);
menu_edit.setMnemonic('E');
menu_view.setMnemonic('V');
menu_help.setMnemonic('H');
editMenu_.setMnemonic('C');
editMenu_.setAccelerator(KeyStroke.getKeyStroke('C',
InputEvent.CTRL_MASK));
editMenu_paste.setMnemonic('P');
editMenu_paste.setAccelerator(KeyStroke.getKeyStroke('V',
InputEvent.CTRL_MASK));
viewmenu_standard.setMnemonic('T');
viewmenu_science.setMnemonic('S');
viewmenu_grouping.setMnemonic('I');
helpmenu_help.setMnemonic('H');
helpmenu_about.setMnemonic('A');
}
publicvoidinit_pan_back(){
pan_back.setSize(340,40);
pan_back.setLocation(85,60);
pan_back.setLayout(newGridLayout(1,3,5,0));
pan_back.add(btn_back);
pan_back.add(btn_ce);
pan_back.add(btn_c);
btn_back.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
if(!jtf_res.getText().trim().equals("0.")){
if(str.length()!=1&&str.length()!=0){
jtf_res.setText(str.delete(str.length()-1,
str.length()).toString());
}else{
jtf_res.setText("0.");
str.setLength(0);
}
}
op2=newBigDecimal(jtf_res.getText().trim());
}
});
btn_c.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
jtf_res.setText("0.");
op1=op2=newBigDecimal(0);
str.replace(0,str.length(),"");
preOp=currentOp=0;
}
});
btn_ce.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
jtf_res.setText("0.");
}
});
}
publicvoidinit_pan_jtf(){
jtf_res.setHorizontalAlignment(JTextField.RIGHT);
jtf_res.setFont(newFont("仿宋",0,20));
jtf_res.setText("0.");
jtf_res.setEditable(false);
//jtf_res.setFocusable(false);
pan_jtf.setSize(420,40);
pan_jtf.setLocation(10,5);
pan_jtf.setLayout(newBorderLayout());
pan_jtf.add(jtf_res);
}
publicvoidinit_pan_mem(){
pan_mem.setSize(60,270);
pan_mem.setLocation(10,60);
pan_mem.setLayout(newGridLayout(5,1,0,5));
pan_mem.add(btn_mem);
btn_mem.setEnabled(false);
pan_mem.add(btn_mc);
pan_mem.add(btn_mr);
pan_mem.add(btn_ms);
pan_mem.add(btn_m);
}
publicvoidinit_pan_num(){
pan_num.setSize(340,220);
pan_num.setLocation(85,110);
pan_num.setLayout(newGridLayout(4,5,5,5));
pan_num.add(btn_7);
pan_num.add(btn_8);
pan_num.add(btn_9);
pan_num.add(btn_div);
pan_num.add(btn_sqrt);
pan_num.add(btn_4);
pan_num.add(btn_5);
pan_num.add(btn_6);
pan_num.add(btn_multi);
pan_num.add(btn_mod);
pan_num.add(btn_1);
pan_num.add(btn_2);
pan_num.add(btn_3);
pan_num.add(btn_sub);
pan_num.add(btn_x);
pan_num.add(btn_0);
pan_num.add(btn_flag);
pan_num.add(btn_point);
pan_num.add(btn_add);
pan_num.add(btn_res);
btn_1.addActionListener(this);
btn_2.addActionListener(this);
btn_3.addActionListener(this);
btn_4.addActionListener(this);
btn_5.addActionListener(this);
btn_6.addActionListener(this);
btn_7.addActionListener(this);
btn_8.addActionListener(this);
btn_9.addActionListener(this);
btn_0.addActionListener(this);
btn_sub.addActionListener(this);
btn_multi.addActionListener(this);
btn_div.addActionListener(this);
btn_add.addActionListener(this);
btn_sqrt.addActionListener(this);
btn_x.addActionListener(this);
btn_res.addActionListener(this);
btn_point.addActionListener(this);
btn_flag.addActionListener(this);
//btn_mod.addActionListener(this);
}
@Override
publicvoidactionPerformed(ActionEvente){
Strings=e.getActionCommand();
BigDecimali=newBigDecimal(1);
Stringtemp=jtf_res.getText().trim();
BigDecimaltemp1=newBigDecimal(temp);
if(e.getSource()==btn_flag){
BigDecimaltemp3=newBigDecimal(jtf_res.getText());
BigDecimaltemp4=newBigDecimal(-1);
BigDecimaltemp5=temp3.multiply(temp4);
jtf_res.setText(""+temp5);
}elseif(s.equals("1/x")){
jtf_res.setText(""+i.divide(temp1,newMathContext(30)));
}elseif(s.equals("sqrt")){
jtf_res.setText(""+temp1.multiply(temp1));
}elseif(s.equals("+")){
str.setLength(0);
if(currentOp==0){
preOp=currentOp=1;
op2=newBigDecimal("0");
jtf_res.setText(""+op1);
}else{
currentOp=preOp;
preOp=1;
switch(currentOp){
case1:
op1=op1.add(op2);
jtf_res.setText(""+op1);
break;
case2:
op1=op1.subtract(op2);
jtf_res.setText(""+op1);
break;
case3:
op1=op1.multiply(op2);
jtf_res.setText(""+op1);
break;
case4:
op1=op1.divide(op2,newMathContext(30));
jtf_res.setText(""+op1);
break;
}
}
}elseif(s.equals("-")){
str.setLength(0);
if(currentOp==0){
preOp=currentOp=2;
jtf_res.setText(""+op1);
}else{
currentOp=preOp;
preOp=2;
switch(currentOp){
case1:
op1=op1.add(op2);
jtf_res.setText(""+op1);
break;
case2:
op1=op1.subtract(op2);
jtf_res.setText(""+op1);
break;
case3:
op1=op1.multiply(op2);
jtf_res.setText(""+op1);
break;
case4:
op1=op1.divide(op2,newMathContext(30));
jtf_res.setText(""+op1);
break;
}
}
}elseif(s.equals("*")){
str.setLength(0);
if(currentOp==0){
preOp=currentOp=3;
jtf_res.setText(""+op1);
}else{
currentOp=preOp;
preOp=3;
switch(currentOp){
case1:
op1=op1.add(op2);
jtf_res.setText(""+op1);
break;
case2:
op1=op1.subtract(op2);
jtf_res.setText(""+op1);
break;
case3:
op1=op1.multiply(op2);
jtf_res.setText(""+op1);
break;
case4:
op1=op1.divide(op2,newMathContext(30));
jtf_res.setText(""+op1);
break;
}
}
}elseif(s.equals("/")){
str.setLength(0);
if(currentOp==0){
preOp=currentOp=4;
jtf_res.setText(""+op1);
}else{
currentOp=preOp;
preOp=4;
switch(currentOp){
case1:
op1=op1.add(op2);
jtf_res.setText(""+op1);
break;
case2:
op1=op1.subtract(op2);
jtf_res.setText(""+op1);
break;
case3:
op1=op1.multiply(op2);
jtf_res.setText(""+op1);
break;
case4:
op1=op1.divide(op2,newMathContext(30));
jtf_res.setText(""+op1);
break;
}
}
}elseif(s.equals("=")){
if(currentOp==0){
str.setLength(0);
jtf_res.setText(""+op2);
}else{
str.setLength(0);
currentOp=preOp;
switch(currentOp){
case1:
op1=op1.add(op2);
jtf_res.setText(""+op1);
break;
case2:
op1=op1.subtract(op2);
jtf_res.setText(""+op1);
break;
case3:
op1=op1.multiply(op2);
jtf_res.setText(""+op1);
break;
case4:
op1=op1.divide(op2,newMathContext(30));
jtf_res.setText(""+op1);
break;
}
currentOp=0;
op2=newBigDecimal("0");
}
}elseif(s.equals(".")){
isBigDecimal=true;
if(jtf_res.getText().trim().indexOf('.')!=-1)
;
else{
if(jtf_res.getText().trim().equals("0")){
str.setLength(0);
jtf_res.setText((str.append("0"+s)).toString());
}elseif(jtf_res.getText().trim().equals("")){
}else{
jtf_res.setText((str.append(s)).toString());
}
}
}elseif(s.equals("0")){
if(jtf_res.getText().trim().equals("0.")){
}else{
jtf_res.setText(str.append(s).toString());
op2=newBigDecimal(jtf_res.getText().trim());
}
}else{
jtf_res.setText(str.append(s).toString());
op2=newBigDecimal(jtf_res.getText().trim());
if(currentOp==0)
op1=op2;
}
}
}
㈦ minecraft里怎麼製造最簡單的計算器
首先,minecraft原版裡面只能用紅石電路產生0和1兩種信號,然後計算器也是計算機的一回種。。。利用答0和1兩種信號來製造計算器就相當於什麼?就是相當於你要使用最簡單的與或非門來製造計算機!!!所以說是非常復雜的,沒有相關的計算機原理知識是無法完成的。。。
以上。。。